summaryrefslogtreecommitdiff
path: root/src/passes/OptimizeAddedConstants.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-09-10 09:53:32 -0700
committerGitHub <noreply@github.com>2024-09-10 09:53:32 -0700
commit2467e70524c96481c34e5ac23b9f068eb60abcbf (patch)
treed3b96a2d0ee01862c742cba24775b6dd15c80cf1 /src/passes/OptimizeAddedConstants.cpp
parent0b07c1b125715ec599c01e182db6729d550bd329 (diff)
downloadbinaryen-2467e70524c96481c34e5ac23b9f068eb60abcbf.tar.gz
binaryen-2467e70524c96481c34e5ac23b9f068eb60abcbf.tar.bz2
binaryen-2467e70524c96481c34e5ac23b9f068eb60abcbf.zip
[NFC] Make LazyLocalGraph even lazier (#6919)
Do not even construct the Flower helper class until we actually need it. This avoids even scanning the function and building the internal CFG if we never get any API call that needs it. This speeds up LICM by 50% (as now we never construct the CFG if we don't find a loop), and Stack IR-enabled binary writing by 10% (as many functions do not have locals in positions that can be optimized using LocalGraph). This moves |locations| from the base class to LocalGraph. It is not needed in the lazy version, so that makes sense for now (we can't keep it in the base, as then it would need to be mutable, which only makes sense for laziness).
Diffstat (limited to 'src/passes/OptimizeAddedConstants.cpp')
0 files changed, 0 insertions, 0 deletions