summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Passes/PassBuilder.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2018-10-23 22:57:40 +0000
committerTeresa Johnson <tejohnson@google.com>2018-10-23 22:57:40 +0000
commitd725335bd19f5aaaea1d387e974ee4c84ec782f2 (patch)
tree47d9601c3f24078c78827d94a831af5b22c20daa /llvm/lib/Passes/PassBuilder.cpp
parent3513dc245ec6666d20faf3a05a0f8b5e051fba0b (diff)
downloadbcm5719-llvm-d725335bd19f5aaaea1d387e974ee4c84ec782f2.tar.gz
bcm5719-llvm-d725335bd19f5aaaea1d387e974ee4c84ec782f2.zip
[hot-cold-split] Only perform splitting in ThinLTO backend post-link
Summary: Fix the new PM to only perform hot cold splitting once during ThinLTO, by skipping it in the pre-link phase. This was already fixed in the old PM by the move of the hot cold split pass later (after the early return when PrepareForThinLTO) by r344869. Reviewers: vsk, sebpop, hiraditya Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D53611 llvm-svn: 345096
Diffstat (limited to 'llvm/lib/Passes/PassBuilder.cpp')
-rw-r--r--llvm/lib/Passes/PassBuilder.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index 8b333b7f8a6..90561b05e62 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -710,7 +710,9 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
MainCGPipeline.addPass(createCGSCCToFunctionPassAdaptor(
buildFunctionSimplificationPipeline(Level, Phase, DebugLogging)));
- if (EnableHotColdSplit)
+ // We only want to do hot cold splitting once for ThinLTO, during the
+ // post-link ThinLTO.
+ if (EnableHotColdSplit && Phase != ThinLTOPhase::PreLink)
MPM.addPass(HotColdSplittingPass());
for (auto &C : CGSCCOptimizerLateEPCallbacks)
OpenPOWER on IntegriCloud