[PATCH] D93684: [SimplifyCFG] Enabled hoisting late in LTO pipeline.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 22 03:26:23 PST 2020
fhahn created this revision.
fhahn added reviewers: mkazantsev, spatel, lebedev.ri.
Herald added subscribers: hiraditya, inglorion.
fhahn requested review of this revision.
Herald added a project: LLVM.
bb7d3af1139c <https://reviews.llvm.org/rGbb7d3af1139c36270bc9948605e06f40e4c51541> disabled hoisting in SimplifyCFG by default, but enabled it
late in the pipeline. But it appears as if the LTO pipelines got missed.
This patch adjusts the LTO pipelines to also enable hoisting in the
later stages.
Unfortunately there's no easy way to add a test for the change I think.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D93684
Files:
llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
Index: llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
===================================================================
--- llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -1087,7 +1087,8 @@
// we may have exposed more scalar opportunities. Run parts of the scalar
// optimizer again at this point.
PM.add(createInstructionCombiningPass()); // Initial cleanup
- PM.add(createCFGSimplificationPass()); // if-convert
+ PM.add(createCFGSimplificationPass(SimplifyCFGOptions() // if-convert
+ .hoistCommonInsts(true)));
PM.add(createSCCPPass()); // Propagate exposed constants
PM.add(createInstructionCombiningPass()); // Clean up again
PM.add(createBitTrackingDCEPass());
@@ -1117,7 +1118,8 @@
PM.add(createHotColdSplittingPass());
// Delete basic blocks, which optimization passes may have killed.
- PM.add(createCFGSimplificationPass());
+ PM.add(
+ createCFGSimplificationPass(SimplifyCFGOptions().hoistCommonInsts(true)));
// Drop bodies of available externally objects to improve GlobalDCE.
PM.add(createEliminateAvailableExternallyPass());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93684.313281.patch
Type: text/x-patch
Size: 1183 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201222/705455a3/attachment.bin>
More information about the llvm-commits
mailing list