summaryrefslogtreecommitdiff
path: root/src/shared-constants.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-09-11 15:07:10 -0700
committerGitHub <noreply@github.com>2024-09-11 15:07:10 -0700
commit0901ba7fff0bac1def4d457b15e4771368abf00d (patch)
tree6c77b0b3df3dcde12bbeda3370d3a168ee45558d /src/shared-constants.h
parent432ed1ccc62aea8c04ac0d2f89a25acedde6c948 (diff)
downloadbinaryen-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