diff options
author | Alon Zakai <azakai@google.com> | 2024-09-11 15:07:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-11 15:07:10 -0700 |
commit | 0901ba7fff0bac1def4d457b15e4771368abf00d (patch) | |
tree | 6c77b0b3df3dcde12bbeda3370d3a168ee45558d /src/shared-constants.h | |
parent | 432ed1ccc62aea8c04ac0d2f89a25acedde6c948 (diff) | |
download | binaryen-0901ba7fff0bac1def4d457b15e4771368abf00d.tar.gz binaryen-0901ba7fff0bac1def4d457b15e4771368abf00d.tar.bz2 binaryen-0901ba7fff0bac1def4d457b15e4771368abf00d.zip |
[NFC] Optimize propagateLocals() (#6928)
That is the slowest part of --precompute-propagate, which is one of our slowest
passes. This makes that pass 25% faster.
The main change is to make the maps consider missing elements as non-constant,
rather than storing a None element in them. That saves allocating entries for the
common case of a non-constant set/get.
Also switch to a simple vector for the work queue, which is possible if we only
add work when a get/set becomes constant (which can only happen once). Another
benefit to adding work in that manner is that we don't start by adding every single
get/set as "work" at the start.
Diffstat (limited to 'src/shared-constants.h')
0 files changed, 0 insertions, 0 deletions