[PATCH] D114704: [llvm][Inline] Add FunctionSimplificationPipeline to module inliner pipeline
Liqiang Tao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 29 06:03:59 PST 2021
taolq updated this revision to Diff 390322.
taolq added a comment.
- add necessary file
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114704/new/
https://reviews.llvm.org/D114704
Files:
llvm/include/llvm/Passes/PassBuilder.h
llvm/lib/Passes/PassBuilderPipelines.cpp
Index: llvm/lib/Passes/PassBuilderPipelines.cpp
===================================================================
--- llvm/lib/Passes/PassBuilderPipelines.cpp
+++ llvm/lib/Passes/PassBuilderPipelines.cpp
@@ -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
Index: llvm/include/llvm/Passes/PassBuilder.h
===================================================================
--- llvm/include/llvm/Passes/PassBuilder.h
+++ llvm/include/llvm/Passes/PassBuilder.h
@@ -199,7 +199,7 @@
/// Construct the module pipeline that performs inlining with
/// module inliner pass.
- ModuleInlinerPass buildModuleInlinerPipeline(OptimizationLevel Level,
+ ModulePassManager buildModuleInlinerPipeline(OptimizationLevel Level,
ThinOrFullLTOPhase Phase);
/// Construct the core LLVM module optimization pipeline.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114704.390322.patch
Type: text/x-patch
Size: 1729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211129/a2cab705/attachment.bin>
More information about the llvm-commits
mailing list