summaryrefslogtreecommitdiff
path: root/src/passes/OptimizeAddedConstants.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-09-10 09:54:51 -0700
committerGitHub <noreply@github.com>2024-09-10 09:54:51 -0700
commit203dcd5c47d6ea784e613f647f8addd9815a3d5b (patch)
tree1212721bf13e0cc945ac5fea9c559ab00f129779 /src/passes/OptimizeAddedConstants.cpp
parent2467e70524c96481c34e5ac23b9f068eb60abcbf (diff)
downloadbinaryen-203dcd5c47d6ea784e613f647f8addd9815a3d5b.tar.gz
binaryen-203dcd5c47d6ea784e613f647f8addd9815a3d5b.tar.bz2
binaryen-203dcd5c47d6ea784e613f647f8addd9815a3d5b.zip
[NFC-ish] Remove LocalGraph from LocalSubtyping (#6921)
The LocalGraph there was used for two purposes: 1. Get the list of gets and sets. 2. Get only the reachable gets and sets. It is trivial to get all the gets and sets in a much faster way, by just walking the code as this PR does. The downside is that we also consider unreachable gets and sets, so unreachable code can prevent us from optimizing, but that seems worthwhile as many passes make that assumption (and they all become maximally effective after --dce). That is the only non-NFC part here. Removing LocalGraph + the fixup code for unreachability makes this significantly shorter, and also 2-3x faster.
Diffstat (limited to 'src/passes/OptimizeAddedConstants.cpp')
0 files changed, 0 insertions, 0 deletions