We only need to look at the attributes of function definitions, nothing else. And currently we spend a couple of milliseconds in computeDimensions.
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.
<rdar://problem/53888075>