From fa8bf8ff214ecfb6fec28d39a47be74e5fcc00a6 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 11 Oct 2021 17:38:22 -0700 Subject: 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. --- src/passes/Directize.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') 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); } }; -- cgit v1.2.3