summaryrefslogtreecommitdiff
path: root/src/passes/OptimizeInstructions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/OptimizeInstructions.cpp')
-rw-r--r--src/passes/OptimizeInstructions.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/passes/OptimizeInstructions.cpp b/src/passes/OptimizeInstructions.cpp
index 80ca7162c..347ebbbe4 100644
--- a/src/passes/OptimizeInstructions.cpp
+++ b/src/passes/OptimizeInstructions.cpp
@@ -26,6 +26,7 @@
#include <ir/bits.h>
#include <ir/cost.h>
#include <ir/effects.h>
+#include <ir/eh-utils.h>
#include <ir/find_all.h>
#include <ir/gc-type-utils.h>
#include <ir/iteration.h>
@@ -229,6 +230,9 @@ struct OptimizeInstructions
// Some patterns create locals (like when we use getResultOfFirst), which we
// may need to fix up.
TypeUpdating::handleNonDefaultableLocals(func, *getModule());
+ // Some patterns create blocks that can interfere 'catch' and 'pop', nesting
+ // the 'pop' into a block making it invalid.
+ EHUtils::handleBlockNestedPops(func, *getModule());
}
// Set to true when one of the visitors makes a change (either replacing the