[webkit-changes] [WebKit/WebKit] fd9da0: [WGSL] GlobalVariableRewriter should visit callees...
Tadeu Zagallo
noreply at github.com
Thu Jun 1 03:26:47 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fd9da075bd46bed693596a3337f63eafeb6da4ad
https://github.com/WebKit/WebKit/commit/fd9da075bd46bed693596a3337f63eafeb6da4ad
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-06-01 (Thu, 01 Jun 2023)
Changed paths:
M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
A Source/WebGPU/WGSL/tests/valid/global-used-by-callee.wgsl
Log Message:
-----------
[WGSL] GlobalVariableRewriter should visit callees before entrypoint
https://bugs.webkit.org/show_bug.cgi?id=257561
rdar://110077039
Reviewed by Myles C. Maxfield.
When collecting used globals, a function should collect its callees' used variables before
its own, but currently we have it inverted. As it currently stands, not only we might miss
globals used by callees, but we'd also add variables used by the caller to the callee. Fixing
it is just a matter of reordering the operations in the visitor.
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::visit):
* Source/WebGPU/WGSL/tests/valid/global-used-by-callee.wgsl: Added.
Canonical link: https://commits.webkit.org/264791@main
More information about the webkit-changes
mailing list