[PATCH] D53611: [hot-cold-split] Only perform splitting in ThinLTO backend post-link
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 23 16:00:02 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL345096: [hot-cold-split] Only perform splitting in ThinLTO backend post-link (authored by tejohnson, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D53611
Files:
llvm/trunk/lib/Passes/PassBuilder.cpp
llvm/trunk/test/Other/new-pm-thinlto-defaults.ll
Index: llvm/trunk/test/Other/new-pm-thinlto-defaults.ll
===================================================================
--- llvm/trunk/test/Other/new-pm-thinlto-defaults.ll
+++ llvm/trunk/test/Other/new-pm-thinlto-defaults.ll
@@ -26,6 +26,10 @@
; RUN: opt -disable-verify -debug-pass-manager -new-pm-debug-info-for-profiling \
; RUN: -passes='thinlto-pre-link<O2>,name-anon-globals' -S %s 2>&1 \
; RUN: | FileCheck %s --check-prefixes=CHECK-DIS,CHECK-O,CHECK-O2,CHECK-PRELINK-O,CHECK-PRELINK-O2
+; Enabling the hot-cold-split pass should not affect the ThinLTO pre-link
+; RUN: opt -disable-verify -debug-pass-manager \
+; RUN: -passes='thinlto-pre-link<O2>,name-anon-globals' -hot-cold-split -S %s 2>&1 \
+; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-PRELINK-O,CHECK-PRELINK-O-NODIS,CHECK-PRELINK-O2
;
; Postlink pipelines:
; RUN: opt -disable-verify -debug-pass-manager \
Index: llvm/trunk/lib/Passes/PassBuilder.cpp
===================================================================
--- llvm/trunk/lib/Passes/PassBuilder.cpp
+++ llvm/trunk/lib/Passes/PassBuilder.cpp
@@ -710,7 +710,9 @@
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53611.170772.patch
Type: text/x-patch
Size: 1551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181023/9bcff115/attachment.bin>
More information about the llvm-commits
mailing list