summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/passes/MergeBlocks.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/passes/MergeBlocks.cpp b/src/passes/MergeBlocks.cpp
index 9d797ae0a..b77dbef83 100644
--- a/src/passes/MergeBlocks.cpp
+++ b/src/passes/MergeBlocks.cpp
@@ -524,14 +524,10 @@ struct MergeBlocks
Expression*& first,
Expression*& second,
Expression*& third) {
- // TODO: for now, just stop when we see any side effect. instead, we could
- // check effects carefully for reordering
Block* outer = nullptr;
- if (EffectAnalyzer(getPassOptions(), *getModule(), first)
- .hasSideEffects()) {
- return;
- }
outer = optimize(curr, first, outer);
+ // TODO: for now, just stop when we see any side effect after the first
+ // item, but we could handle them carefully like we do for binaries.
if (EffectAnalyzer(getPassOptions(), *getModule(), second)
.hasSideEffects()) {
return;