summaryrefslogtreecommitdiff
path: root/src/passes/MergeBlocks.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-07-24 13:50:29 -0700
committerAlon Zakai <alonzakai@gmail.com>2017-07-24 13:50:29 -0700
commit96e9398420dd4612bc3f72ad8fedbcbc55e1577a (patch)
tree5ff129e378a8cf05f08cc6718f4f577d1282f00f /src/passes/MergeBlocks.cpp
parent93dcb15eba5051f36dad86d479935dede6f0b05f (diff)
downloadbinaryen-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.cpp2
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) {