summaryrefslogtreecommitdiff
path: root/src/passes/RelooperJumpThreading.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/RelooperJumpThreading.cpp')
-rw-r--r--src/passes/RelooperJumpThreading.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/passes/RelooperJumpThreading.cpp b/src/passes/RelooperJumpThreading.cpp
index d3fd1844f..3656b5523 100644
--- a/src/passes/RelooperJumpThreading.cpp
+++ b/src/passes/RelooperJumpThreading.cpp
@@ -22,9 +22,11 @@
#include "wasm.h"
#include "pass.h"
#include "ast_utils.h"
+#include "ast/manipulation.h"
namespace wasm {
+
static Name LABEL("label");
static Name getInnerName(int i) {
@@ -147,6 +149,11 @@ struct RelooperJumpThreading : public WalkerPass<ExpressionStackWalker<RelooperJ
}
}
+ void visitFunction(Function* curr) {
+ // we may alter types
+ ReFinalize().walkFunctionInModule(curr, getModule());
+ }
+
private:
bool hasIrreducibleControlFlow(If* iff, Expression* origin) {