summaryrefslogtreecommitdiff
path: root/src/ir/possible-contents.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-10-25 16:48:30 -0700
committerGitHub <noreply@github.com>2022-10-25 16:48:30 -0700
commit2741c003422fffbf276a521a773521c951c03221 (patch)
tree75e045722de6fd3678236a09b73a573fd0f70ffc /src/ir/possible-contents.cpp
parent79e032ac1124f82729bb21684f370044612c7124 (diff)
downloadbinaryen-2741c003422fffbf276a521a773521c951c03221.tar.gz
binaryen-2741c003422fffbf276a521a773521c951c03221.tar.bz2
binaryen-2741c003422fffbf276a521a773521c951c03221.zip
Move removable code in CodePushing (#5187)
This is safe since we "partially remove" it: we don't move it to a place it might execute more, but make it possibly execute less. See the new comment for more details. Motivated by wasm GC but this can help wasm MVP as well. In both cases loads from memory can trap, which limits what the VM can do to optimize them past conditions, but in trapsNeverHappens we can do that at the toolchain level: x = read(); if () { .. } use(x); => if () { .. } x = read(); // moved to here, and might not execute if the if did a break/return use(x);
Diffstat (limited to 'src/ir/possible-contents.cpp')
0 files changed, 0 insertions, 0 deletions