[PATCH] D114704: add FunctionSimplificationPipeline to module inliner pipeline
Liqiang Tao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 29 05:58:00 PST 2021
taolq created this revision.
Herald added a subscriber: hiraditya.
taolq requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D114704
Files:
llvm/lib/Passes/PassBuilderPipelines.cpp
Index: llvm/lib/Passes/PassBuilderPipelines.cpp
===================================================================
--- llvm/lib/Passes/PassBuilderPipelines.cpp
+++ llvm/lib/Passes/PassBuilderPipelines.cpp
@@ -155,7 +155,7 @@
cl::desc("Enable memory profiler"));
static cl::opt<bool> EnableModuleInliner("enable-module-inliner",
- cl::init(false), cl::Hidden,
+ cl::init(true), cl::Hidden,
cl::desc("Enable module inliner"));
static cl::opt<bool> PerformMandatoryInliningsFirst(
@@ -754,9 +754,11 @@
return MIWP;
}
-ModuleInlinerPass
+ModulePassManager
PassBuilder::buildModuleInlinerPipeline(OptimizationLevel Level,
ThinOrFullLTOPhase Phase) {
+ ModulePassManager MPM;
+
InlineParams IP = getInlineParamsFromOptLevel(Level);
if (Phase == ThinOrFullLTOPhase::ThinLTOPreLink && PGOOpt &&
PGOOpt->Action == PGOOptions::SampleUse)
@@ -773,7 +775,16 @@
// inline deferral logic in module inliner.
IP.EnableDeferral = false;
- return ModuleInlinerPass(IP, UseInlineAdvisor);
+ MPM.addPass(ModuleInlinerPass(IP, UseInlineAdvisor));
+
+ MPM.addPass(createModuleToFunctionPassAdaptor(
+ buildFunctionSimplificationPipeline(Level, Phase),
+ PTO.EagerlyInvalidateAnalyses));
+
+ MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(
+ CoroSplitPass(Level != OptimizationLevel::O0)));
+
+ return MPM;
}
ModulePassManager
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114704.390321.patch
Type: text/x-patch
Size: 1571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211129/37f5a86d/attachment.bin>
More information about the llvm-commits
mailing list