Bug 200472

Summary: [WHLSL] Remove the auto initialize variables pass
Product: WebKit Reporter: Saam Barati <saam>
Component: WebGPUAssignee: Saam Barati <saam>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, fpizlo, jonlee, justin_fan, mmaxfield, rmorisset, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch none

Description Saam Barati 2019-08-06 10:54:40 PDT
It's logically nicer to do this transformation over the AST, as it removes code that needs to be done in AST lowering to Metal. However, this phase takes ~1.2ms on compute_boids, and it's trivial to emit what this phase does in metal lowering. So we should just do that instead to gain some minor perf.
Comment 1 Saam Barati 2019-08-06 12:06:38 PDT
Created attachment 375640 [details]
patch
Comment 2 Robin Morisset 2019-08-06 12:21:48 PDT
Comment on attachment 375640 [details]
patch

r=me
Doesn't this also make synthesizeConstructors unnecessary? Since these constructors were only used in this pass I think.
Comment 3 Saam Barati 2019-08-06 12:37:16 PDT
(In reply to Robin Morisset from comment #2)
> Comment on attachment 375640 [details]
> patch
> 
> r=me
> Doesn't this also make synthesizeConstructors unnecessary? Since these
> constructors were only used in this pass I think.

Not quite, as user code can call these. But as Robin and I discussed offline, we could change this to not auto generate such things. However, I'll leave this for a future change after we discuss what to do.
Comment 4 WebKit Commit Bot 2019-08-06 13:31:10 PDT
Comment on attachment 375640 [details]
patch

Clearing flags on attachment: 375640

Committed r248310: <https://trac.webkit.org/changeset/248310>
Comment 5 WebKit Commit Bot 2019-08-06 13:31:12 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-08-06 13:32:18 PDT
<rdar://problem/54001035>