diff options
Diffstat (limited to 'src/passes/Inlining.cpp')
-rw-r--r-- | src/passes/Inlining.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/passes/Inlining.cpp b/src/passes/Inlining.cpp index 1e5089b97..a625464cd 100644 --- a/src/passes/Inlining.cpp +++ b/src/passes/Inlining.cpp @@ -266,9 +266,7 @@ struct Inlining : public Pass { infos[func->name]; } PassRunner runner(module); - runner.setIsNested(true); - runner.add<FunctionInfoScanner>(&infos); - runner.run(); + FunctionInfoScanner(&infos).run(&runner, module); // fill in global uses // anything exported or used in a table should not be inlined for (auto& ex : module->exports) { @@ -300,12 +298,7 @@ struct Inlining : public Pass { state.actionsForFunction[func->name]; } // find and plan inlinings - { - PassRunner runner(module); - runner.setIsNested(true); - runner.add<Planner>(&state); - runner.run(); - } + Planner(&state).run(runner, module); // perform inlinings TODO: parallelize std::unordered_map<Name, Index> inlinedUses; // how many uses we inlined // which functions were inlined into |