diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-09-16 10:34:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-16 10:34:44 -0700 |
commit | 7292ef9c863a0766c697cc0a77516447ff652820 (patch) | |
tree | e296b38cf2181d3a51a293664509000bbd625bc4 /src/passes/RemoveUnusedBrs.cpp | |
parent | 22548bf789359be1f3c14aa41ffd4a23fda38542 (diff) | |
parent | 88c92cbfe7d9f69fa8605fa406e5dbb2ac628172 (diff) | |
download | binaryen-7292ef9c863a0766c697cc0a77516447ff652820.tar.gz binaryen-7292ef9c863a0766c697cc0a77516447ff652820.tar.bz2 binaryen-7292ef9c863a0766c697cc0a77516447ff652820.zip |
Merge pull request #699 from WebAssembly/opts
Fuzz bug fixes
Diffstat (limited to 'src/passes/RemoveUnusedBrs.cpp')
-rw-r--r-- | src/passes/RemoveUnusedBrs.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/passes/RemoveUnusedBrs.cpp b/src/passes/RemoveUnusedBrs.cpp index 86a46374f..fa8ab2f6c 100644 --- a/src/passes/RemoveUnusedBrs.cpp +++ b/src/passes/RemoveUnusedBrs.cpp @@ -218,7 +218,7 @@ struct RemoveUnusedBrs : public WalkerPass<PostWalker<RemoveUnusedBrs, Visitor<R // let's try to move the code going to the top of the loop into the if-else if (!iff->ifFalse) { // we need the ifTrue to break, so it cannot reach the code we want to move - if (ExpressionAnalyzer::getEndingSimpleBreak(iff->ifTrue)) { + if (ExpressionAnalyzer::obviouslyDoesNotFlowOut(iff->ifTrue)) { iff->ifFalse = builder.stealSlice(block, i + 1, list.size()); return true; } @@ -226,10 +226,10 @@ struct RemoveUnusedBrs : public WalkerPass<PostWalker<RemoveUnusedBrs, Visitor<R // this is already an if-else. if one side is a dead end, we can append to the other, if // there is no returned value to concern us assert(!isConcreteWasmType(iff->type)); // can't be, since in the middle of a block - if (ExpressionAnalyzer::getEndingSimpleBreak(iff->ifTrue)) { + if (ExpressionAnalyzer::obviouslyDoesNotFlowOut(iff->ifTrue)) { iff->ifFalse = builder.blockifyMerge(iff->ifFalse, builder.stealSlice(block, i + 1, list.size())); return true; - } else if (ExpressionAnalyzer::getEndingSimpleBreak(iff->ifFalse)) { + } else if (ExpressionAnalyzer::obviouslyDoesNotFlowOut(iff->ifFalse)) { iff->ifTrue = builder.blockifyMerge(iff->ifTrue, builder.stealSlice(block, i + 1, list.size())); return true; } |