[PATCH] D146805: [Pass Builder] Allow Module Inliner for full lto
IBricchi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 24 08:05:45 PDT 2023
IBricchi updated this revision to Diff 508101.
IBricchi added a comment.
format
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146805/new/
https://reviews.llvm.org/D146805
Files:
llvm/lib/Passes/PassBuilderPipelines.cpp
Index: llvm/lib/Passes/PassBuilderPipelines.cpp
===================================================================
--- llvm/lib/Passes/PassBuilderPipelines.cpp
+++ llvm/lib/Passes/PassBuilderPipelines.cpp
@@ -1708,11 +1708,16 @@
// valuable as the inliner doesn't currently care whether it is inlining an
// invoke or a call.
// Run the inliner now.
- MPM.addPass(ModuleInlinerWrapperPass(
- getInlineParamsFromOptLevel(Level),
- /* MandatoryFirst */ true,
- InlineContext{ThinOrFullLTOPhase::FullLTOPostLink,
- InlinePass::CGSCCInliner}));
+ if (EnableModuleInliner) {
+ MPM.addPass(
+ buildModuleInlinerPipeline(Level, ThinOrFullLTOPhase::FullLTOPostLink));
+ } else {
+ MPM.addPass(ModuleInlinerWrapperPass(
+ getInlineParamsFromOptLevel(Level),
+ /* MandatoryFirst */ true,
+ InlineContext{ThinOrFullLTOPhase::FullLTOPostLink,
+ InlinePass::CGSCCInliner}));
+ }
// Perform context disambiguation after inlining, since that would reduce the
// amount of additional cloning required to distinguish the allocation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146805.508101.patch
Type: text/x-patch
Size: 1126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230324/685315ed/attachment.bin>
More information about the llvm-commits
mailing list