diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-07-24 13:50:29 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2017-07-24 13:50:29 -0700 |
commit | 96e9398420dd4612bc3f72ad8fedbcbc55e1577a (patch) | |
tree | 5ff129e378a8cf05f08cc6718f4f577d1282f00f /src/passes/MergeBlocks.cpp | |
parent | 93dcb15eba5051f36dad86d479935dede6f0b05f (diff) | |
download | binaryen-96e9398420dd4612bc3f72ad8fedbcbc55e1577a.tar.gz binaryen-96e9398420dd4612bc3f72ad8fedbcbc55e1577a.tar.bz2 binaryen-96e9398420dd4612bc3f72ad8fedbcbc55e1577a.zip |
when finalizing a block in MergeBlocks, use its type, so that we don't need to consider type changes for its parent (changing it from a forced i32 to an unreachable might mean the parent needs to become unreachable too)
Diffstat (limited to 'src/passes/MergeBlocks.cpp')
-rw-r--r-- | src/passes/MergeBlocks.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passes/MergeBlocks.cpp b/src/passes/MergeBlocks.cpp index 455e54971..d32948bee 100644 --- a/src/passes/MergeBlocks.cpp +++ b/src/passes/MergeBlocks.cpp @@ -213,7 +213,7 @@ static void optimizeBlock(Block* curr, Module* module) { break; } } - if (changed) curr->finalize(); + if (changed) curr->finalize(curr->type); } void BreakValueDropper::visitBlock(Block* curr) { |