summaryrefslogtreecommitdiff
path: root/src/ir/lubs.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-12-08 11:22:03 -0800
committerGitHub <noreply@github.com>2021-12-08 11:22:03 -0800
commitf7be757a71e5562afad898992574681d50a67dbf (patch)
tree6f65e6caded06351e5172cf3f22f276a232fb2d0 /src/ir/lubs.cpp
parentba01236b26d7ea97f165af310fbb6fb99be6239a (diff)
downloadbinaryen-f7be757a71e5562afad898992574681d50a67dbf.tar.gz
binaryen-f7be757a71e5562afad898992574681d50a67dbf.tar.bz2
binaryen-f7be757a71e5562afad898992574681d50a67dbf.zip
SimplifyGlobals: Handle nested read-only-to-write patterns (#4365)
The general pattern is if (!global) { global = 1 } This PR generalizes that to handle nested appearances, if ({ if (!global) { global = 1 } !global }) { global = 1 } With this I can finally see no more "once" global operations on the hottest function in the currently slowest j2wasm benchmark ("filter"). Also added a failing testcase for something we do not handle yet.
Diffstat (limited to 'src/ir/lubs.cpp')
0 files changed, 0 insertions, 0 deletions