[PATCH] D146803: [Pass Builder] Allow Module Inliner for full lto
IBricchi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 24 04:36:15 PDT 2023
IBricchi created this revision.
Herald added subscribers: hiraditya, inglorion.
Herald added a project: All.
IBricchi requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Currently there is no way to enable the module inliner
when linking with -flto=full. This patch enables that
option.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146803
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,14 @@
// 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){
+ errs() << "GOOD INLINER\n";
+ MPM.addPass(buildModuleInlinerPipeline(Level, ThinOrFullLTOPhase::FullLTOPostLink));
+ }
+ else{
+ errs() << "FUCKING INLINER\n";
+ MPM.addPass(buildInlinerPipeline(Level, ThinOrFullLTOPhase::FullLTOPostLink));
+ }
// 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: D146803.508048.patch
Type: text/x-patch
Size: 1034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230324/a04ec790/attachment.bin>
More information about the llvm-commits
mailing list