diff options
Diffstat (limited to 'src/ir/lubs.cpp')
-rw-r--r-- | src/ir/lubs.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ir/lubs.cpp b/src/ir/lubs.cpp index 852c27677..ead1299b5 100644 --- a/src/ir/lubs.cpp +++ b/src/ir/lubs.cpp @@ -45,15 +45,15 @@ LUBFinder getResultsLUB(Function* func, Module& wasm) { // ) ReFinalize().walkFunctionInModule(func, &wasm); - lub.noteUpdatableExpression(func->body); - if (lub.getBestPossible() == originalType) { + lub.note(func->body->type); + if (lub.getLUB() == originalType) { return lub; } // Scan the body and look at the returns. First, return expressions. for (auto* ret : FindAll<Return>(func->body).list) { - lub.noteUpdatableExpression(ret->value); - if (lub.getBestPossible() == originalType) { + lub.note(ret->value->type); + if (lub.getLUB() == originalType) { return lub; } } @@ -64,7 +64,7 @@ LUBFinder getResultsLUB(Function* func, Module& wasm) { // Return whether we still look ok to do the optimization. If this is // false then we can stop here. lub.note(type); - return lub.getBestPossible() != originalType; + return lub.getLUB() != originalType; }; for (auto* call : FindAll<Call>(func->body).list) { |