summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-05-01 12:25:06 -0700
committerGitHub <noreply@github.com>2023-05-01 12:25:06 -0700
commit6fee09ae5734f0e16b7119649ef20818997654a3 (patch)
tree462779d6f5eaaef33ab684f4812f2d0aa7062e50 /src
parente87d3a455580b20fa71abf5fe58b6d62cb41980d (diff)
downloadbinaryen-6fee09ae5734f0e16b7119649ef20818997654a3.tar.gz
binaryen-6fee09ae5734f0e16b7119649ef20818997654a3.tar.bz2
binaryen-6fee09ae5734f0e16b7119649ef20818997654a3.zip
[Wasm GC] Always refinalize in SignatureRefining (#5694)
We used to refine only for result changes, but param changes can also lead to opportunities.
Diffstat (limited to 'src')
-rw-r--r--src/passes/SignatureRefining.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/passes/SignatureRefining.cpp b/src/passes/SignatureRefining.cpp
index de669dbb2..281214e32 100644
--- a/src/passes/SignatureRefining.cpp
+++ b/src/passes/SignatureRefining.cpp
@@ -156,8 +156,6 @@ struct SignatureRefining : public Pass {
}
}
- bool refinedResults = false;
-
// Compute optimal LUBs.
std::unordered_set<HeapType> seen;
for (auto& func : module->functions) {
@@ -225,8 +223,6 @@ struct SignatureRefining : public Pass {
newSignatures[type] = Signature(newParams, newResults);
if (newResults != func->getResults()) {
- refinedResults = true;
-
// Update the types of calls using the signature.
for (auto* call : info.calls) {
if (call->type != Type::unreachable) {
@@ -288,11 +284,8 @@ struct SignatureRefining : public Pass {
// Rewrite the types.
GlobalTypeRewriter::updateSignatures(newSignatures, *module);
- if (refinedResults) {
- // After return types change we need to propagate.
- // TODO: we could do this only in relevant functions perhaps
- ReFinalize().run(getPassRunner(), module);
- }
+ // TODO: we could do this only in relevant functions perhaps
+ ReFinalize().run(getPassRunner(), module);
}
};