summaryrefslogtreecommitdiff
path: root/src/tools/wasm-emscripten-finalize.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-11-08 07:54:03 -0800
committerGitHub <noreply@github.com>2023-11-08 07:54:03 -0800
commit9627c8360d179c2cae168f8bca3bf1b7216c34a8 (patch)
tree77f4eeb54f47b59f44d90e0c206dbbf40600f3b3 /src/tools/wasm-emscripten-finalize.cpp
parent3640f9c992746867c5cf4cead11077e36a51eb7c (diff)
downloadbinaryen-9627c8360d179c2cae168f8bca3bf1b7216c34a8.tar.gz
binaryen-9627c8360d179c2cae168f8bca3bf1b7216c34a8.tar.bz2
binaryen-9627c8360d179c2cae168f8bca3bf1b7216c34a8.zip
LocalCSE: Do not optimize small things like global.get (#6087)
LocalCSE is nice for large expressions, but for small things it has always been of unclear benefit since VMs also do GVN/CSE anyhow. So we are likely not speeding anything up, but hopefully we are reducing code size at least. Doing LocalCSE on something small like a global.get is very possibly going to increase code size, however (since we add a tee, and since the local gets are of similar size to global gets - depends on LUB sizes). On real-world Java code that overhead is noticeable, so this PR makes us more careful, and we skip things of size 1 (no children).
Diffstat (limited to 'src/tools/wasm-emscripten-finalize.cpp')
0 files changed, 0 insertions, 0 deletions