Summary: | [WHLSL] Avoid visiting the full AST in computeDimensions | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Robin Morisset <rmorisset> | ||||
Component: | WebGPU | Assignee: | Robin Morisset <rmorisset> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, mmaxfield, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Robin Morisset
2019-08-02 16:40:46 PDT
Created attachment 375466 [details]
Patch
2ms -> 0.002ms for that pass.
Comment on attachment 375466 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=375466&action=review > Source/WebCore/Modules/webgpu/WHLSL/WHLSLComputeDimensions.cpp:52 > + if (&functionDefinition == &entryPoint) { Can we move this check outside of the nearest for loop? (In reply to Myles C. Maxfield from comment #2) > Comment on attachment 375466 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=375466&action=review > > > Source/WebCore/Modules/webgpu/WHLSL/WHLSLComputeDimensions.cpp:52 > > + if (&functionDefinition == &entryPoint) { > > Can we move this check outside of the nearest for loop? Not easily: the loop has two jobs, both computing the dimensions for the entry point and verifying that no function has multiple NumThreads attributes. So we can't just "continue;" in the case where &functionDefinition != &entryPoint. Comment on attachment 375466 [details] Patch Clearing flags on attachment: 375466 Committed r248194: <https://trac.webkit.org/changeset/248194> All reviewed patches have been landed. Closing bug. |