[PATCH] D132844: [WIP][IROutliner] Enable the IR outliner post-link for full LTO
Lewis Revill via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 29 03:59:32 PDT 2022
lewis-revill created this revision.
lewis-revill added reviewers: paquette, rriddle, jdoerfert.
Herald added subscribers: luke957, simoncook, s.egerton, PkmX, hiraditya, arichardson, inglorion.
Herald added a project: All.
lewis-revill requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.
This patch simply adds the IR outliner to the pipeline of optimizations run under FullLTO post-link. This seems like the right thing to do to capture more candidates, and it provides a small benefit for code size on Embench on riscv32.
Work in progress because I still need to check which tests need to be updated, but submitted for discussion as is.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D132844
Files:
llvm/lib/Passes/PassBuilderPipelines.cpp
Index: llvm/lib/Passes/PassBuilderPipelines.cpp
===================================================================
--- llvm/lib/Passes/PassBuilderPipelines.cpp
+++ llvm/lib/Passes/PassBuilderPipelines.cpp
@@ -1735,6 +1735,10 @@
if (EnableHotColdSplit)
MPM.addPass(HotColdSplittingPass());
+ // Enable IR outlining late in the FullLTO post-link pipeline.
+ if (EnableIROutliner)
+ MPM.addPass(IROutlinerPass());
+
// Add late LTO optimization passes.
// Delete basic blocks, which optimization passes may have killed.
MPM.addPass(createModuleToFunctionPassAdaptor(SimplifyCFGPass(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132844.456302.patch
Type: text/x-patch
Size: 605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220829/3df3783a/attachment.bin>
More information about the llvm-commits
mailing list