diff options
author | Alon Zakai <azakai@google.com> | 2021-10-11 17:38:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 17:38:22 -0700 |
commit | fa8bf8ff214ecfb6fec28d39a47be74e5fcc00a6 (patch) | |
tree | d5d3781f6d58a411640810be37fb4e0e3d91c982 /src | |
parent | c06b2925232b92fd379a3e8d513ab361b8434a15 (diff) | |
download | binaryen-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/Directize.cpp | 6 |
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); } }; |