diff options
author | Alon Zakai <azakai@google.com> | 2024-07-08 14:18:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-08 14:18:31 -0700 |
commit | e93babcd71a89bd8c8e170d11652ca7375ef01f3 (patch) | |
tree | b1c9bbcd1a13db9051838e9f13ab85292c5c439b /src/asmjs/asm_v_wasm.cpp | |
parent | 4179603f8c21f5676cf4826ec4e41a1513c41540 (diff) | |
download | binaryen-e93babcd71a89bd8c8e170d11652ca7375ef01f3.tar.gz binaryen-e93babcd71a89bd8c8e170d11652ca7375ef01f3.tar.bz2 binaryen-e93babcd71a89bd8c8e170d11652ca7375ef01f3.zip |
StackIR: Optimize away a drop before an unreachable (#6719)
Anything else right before an unreachable is removed by the main DCE
pass anyhow, but because of the structured form of BinaryenIR we can't remove
a drop. That is, this is the difference between
(i32.eqz
(i32.const 42)
(unreachable)
)
and
(drop
(call $foo)
)
(unreachable)
In both cases the unreachable is preceded by something we don't need,
but in the latter case it must remain in BinaryenIR for validation.
To optimize this, add a rule in StackIR.
Fixes #6715
Diffstat (limited to 'src/asmjs/asm_v_wasm.cpp')
0 files changed, 0 insertions, 0 deletions