[PATCH] D146805: [Pass Builder] Allow Module Inliner for full lto
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 3 05:16:59 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1a36eaa552f1: [Pass Builder] Allow Module Inliner for full LTO (authored by IBricchi, committed by nikic).
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,17 @@
// 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(ModuleInlinerPass(getInlineParamsFromOptLevel(Level),
+ UseInlineAdvisor,
+ 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.510458.patch
Type: text/x-patch
Size: 1224 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230403/e47c68b4/attachment.bin>
More information about the llvm-commits
mailing list