Bug 200472 - [WHLSL] Remove the auto initialize variables pass
Summary: [WHLSL] Remove the auto initialize variables pass
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-06 10:54 PDT by Saam Barati
Modified: 2019-08-06 13:32 PDT (History)
9 users (show)

See Also:


Attachments
patch (12.47 KB, patch)
2019-08-06 12:06 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>