summaryrefslogtreecommitdiff
path: root/test/binaryen.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2018-04-26 15:22:46 -0700
committerGitHub <noreply@github.com>2018-04-26 15:22:46 -0700
commit52d14d008a6a836c2cdbfe68852d274840e5de14 (patch)
tree684b2bef11816892107096fb92a6110dc2f776ab /test/binaryen.js
parent353be4a0537de508f45ee72624d1af65bd5597dd (diff)
downloadbinaryen-52d14d008a6a836c2cdbfe68852d274840e5de14.tar.gz
binaryen-52d14d008a6a836c2cdbfe68852d274840e5de14.tar.bz2
binaryen-52d14d008a6a836c2cdbfe68852d274840e5de14.zip
code-folding improvements (#1512)
Noticed by Souper. * We only folded identical code in an if-else when both arms were blocks, so we were missing the case of one arm being just a singleton expression. This PR will wraps that in a block so the rest of the optimization can work on it, if it sees it is going to be folded out. Turns out this is common for phis. * We only ran code-folding in -Os, because I assumed it was just good for code size, but as it may remove phis in the wasm VM later, seems like we should run it when not optimizing for size as well. Together, these two shrink lua -O3 by almost 1%.
Diffstat (limited to 'test/binaryen.js')
0 files changed, 0 insertions, 0 deletions