diff options
author | Alon Zakai <azakai@google.com> | 2024-08-28 09:13:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-28 09:13:33 -0700 |
commit | 95ddd057424b996a0a2a54f282c6c567246d8cc9 (patch) | |
tree | 5fb5cf34c779f1cf9cb49208e470d557db91b177 /src/passes/Precompute.cpp | |
parent | e2ceaa58c10e9ee3e9eece42466243f5a8aff125 (diff) | |
download | binaryen-95ddd057424b996a0a2a54f282c6c567246d8cc9.tar.gz binaryen-95ddd057424b996a0a2a54f282c6c567246d8cc9.tar.bz2 binaryen-95ddd057424b996a0a2a54f282c6c567246d8cc9.zip |
[NFC] Refactor LocalGraph's core getSets API (#6877)
Before we just had a map that people would access with localGraph.getSetses[get],
while now it is a call localGraph.getSets(get), which more nicely hides the internal
implementation details.
Also rename getSetses => getSetsMap.
This will allow a later PR to optimize the internals of this API.
This is performance-neutral as far as I can measure. (We do replace a direct read
from a data structure with a call, but the call is in a header and should always get
inlined.)
Diffstat (limited to 'src/passes/Precompute.cpp')
-rw-r--r-- | src/passes/Precompute.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passes/Precompute.cpp b/src/passes/Precompute.cpp index 6e0d7535f..61220ece8 100644 --- a/src/passes/Precompute.cpp +++ b/src/passes/Precompute.cpp @@ -814,7 +814,7 @@ private: // for this get to have constant value, all sets must agree Literals values; bool first = true; - for (auto* set : localGraph.getSetses[get]) { + for (auto* set : localGraph.getSets(get)) { Literals curr; if (set == nullptr) { if (getFunction()->isVar(get->index)) { |