summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-10-11 17:38:22 -0700
committerGitHub <noreply@github.com>2021-10-11 17:38:22 -0700
commitfa8bf8ff214ecfb6fec28d39a47be74e5fcc00a6 (patch)
treed5d3781f6d58a411640810be37fb4e0e3d91c982
parentc06b2925232b92fd379a3e8d513ab361b8434a15 (diff)
downloadbinaryen-fa8bf8ff214ecfb6fec28d39a47be74e5fcc00a6.tar.gz
binaryen-fa8bf8ff214ecfb6fec28d39a47be74e5fcc00a6.tar.bz2
binaryen-fa8bf8ff214ecfb6fec28d39a47be74e5fcc00a6.zip
Remove forgotten call_ref-related logic in Directize. NFC (#4233)
We moved call_ref out of there, but it was still checking for the possible presence of call_refs (using the feature), which means that even if we had no valid tables to optimize on, we'd scan the whole module.
-rw-r--r--src/passes/Directize.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/passes/Directize.cpp b/src/passes/Directize.cpp
index 67d9e77a8..ea6a946f5 100644
--- a/src/passes/Directize.cpp
+++ b/src/passes/Directize.cpp
@@ -226,12 +226,10 @@ struct Directize : public Pass {
}
}
- // Without typed function references, all we can do is optimize table
- // accesses, so if we can't do that, stop.
- if (validTables.empty() && !module->features.hasTypedFunctionReferences()) {
+ if (validTables.empty()) {
return;
}
- // The table exists and is constant, so this is possible.
+
FunctionDirectizer(validTables).run(runner, module);
}
};