[webkit-changes] [WebKit/WebKit] 0bdc0c: [WGSL] Make callee ordering deterministic
Tadeu Zagallo
noreply at github.com
Wed Jun 7 01:32:01 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0bdc0ccabceb139e0f8fe7498eee77bf63969208
https://github.com/WebKit/WebKit/commit/0bdc0ccabceb139e0f8fe7498eee77bf63969208
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-06-07 (Wed, 07 Jun 2023)
Changed paths:
M Source/WebGPU/WGSL/CallGraph.cpp
Log Message:
-----------
[WGSL] Make callee ordering deterministic
https://bugs.webkit.org/show_bug.cgi?id=257714
rdar://110263964
Reviewed by Myles C. Maxfield.
The call graph's callee list was built from a HashMap, which meant we visited
callees in a non-deterministic order. This makes it harder to write tests that
rely on the order of the output, and we also had crashes that were happening
only when we visited the callees in a certain order. To fix this, we consistently
put callees in a list as we discover them and use the previous hash map to keep
track of where a given callee is on the list so we can add call sites to it later.
* Source/WebGPU/WGSL/CallGraph.cpp:
(WGSL::CallGraphBuilder::visit):
Canonical link: https://commits.webkit.org/264932@main
More information about the webkit-changes
mailing list