summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/passes/Asyncify.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/passes/Asyncify.cpp b/src/passes/Asyncify.cpp
index d0d03c9d1..dc2ebd4d4 100644
--- a/src/passes/Asyncify.cpp
+++ b/src/passes/Asyncify.cpp
@@ -1269,6 +1269,15 @@ private:
};
RelevantLiveLocalsWalker walker;
+ walker.setFunction(func);
+ if (!walker.canRun(func)) {
+ // We can proceed without this optimization, which will cause more
+ // spilling - assume all locals are relevant.
+ for (Index i = 0; i < func->getNumLocals(); i++) {
+ relevantLiveLocals.insert(i);
+ }
+ return;
+ }
walker.walkFunctionInModule(func, getModule());
// The relevant live locals are ones that are alive at an unwind/rewind
// location. TODO look more precisely inside basic blocks, as one might stop