[PATCH] D143424: [Pipeline] Move ControlHeightReduction to module optimization pipeline
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 16 15:23:59 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb374423304a8: [Pipeline] Move ControlHeightReduction to module optimization pipeline (authored by aeubanks).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143424/new/
https://reviews.llvm.org/D143424
Files:
llvm/lib/Passes/PassBuilderPipelines.cpp
llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
Index: llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
===================================================================
--- llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
+++ llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
@@ -148,9 +148,6 @@
; CHECK-O23SZ-NEXT: Running pass: CoroElidePass
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
; CHECK-O-NEXT: Running pass: InstCombinePass
-; CHECK-O3-NEXT: Running pass: ControlHeightReductionPass on foo
-; CHECK-O3-NEXT: Running analysis: RegionInfoAnalysis on foo
-; CHECK-O3-NEXT: Running analysis: DominanceFrontierAnalysis on foo
; CHECK-O-NEXT: Running analysis: ShouldNotRunFunctionPassesAnalysis
; CHECK-O-NEXT: Running pass: CoroSplitPass
; CHECK-O-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ShouldNotRunFunctionPassesAnalysis
Index: llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
===================================================================
--- llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
+++ llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
@@ -184,9 +184,6 @@
; CHECK-O23SZ-NEXT: Running pass: CoroElidePass
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
; CHECK-O-NEXT: Running pass: InstCombinePass
-; CHECK-O3-NEXT: Running pass: ControlHeightReductionPass on foo
-; CHECK-O3-NEXT: Running analysis: RegionInfoAnalysis on foo
-; CHECK-O3-NEXT: Running analysis: DominanceFrontierAnalysis on foo
; CHECK-O-NEXT: Running analysis: ShouldNotRunFunctionPassesAnalysis
; CHECK-O-NEXT: Running pass: CoroSplitPass
; CHECK-O-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ShouldNotRunFunctionPassesAnalysis
Index: llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
===================================================================
--- llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
+++ llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
@@ -154,9 +154,6 @@
; CHECK-O23SZ-NEXT: Running pass: CoroElidePass
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
; CHECK-O-NEXT: Running pass: InstCombinePass
-; CHECK-O3-NEXT: Running pass: ControlHeightReductionPass on foo
-; CHECK-O3-NEXT: Running analysis: RegionInfoAnalysis on foo
-; CHECK-O3-NEXT: Running analysis: DominanceFrontierAnalysis on foo
; CHECK-O-NEXT: Running analysis: ShouldNotRunFunctionPassesAnalysis
; CHECK-O-NEXT: Running pass: CoroSplitPass
; CHECK-O-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ShouldNotRunFunctionPassesAnalysis
@@ -171,6 +168,9 @@
; CHECK-O-NEXT: Running pass: RecomputeGlobalsAAPass
; CHECK-O-NEXT: Running pass: Float2IntPass
; CHECK-O-NEXT: Running pass: LowerConstantIntrinsicsPass
+; CHECK-O3-NEXT: Running pass: ControlHeightReductionPass on foo
+; CHECK-O3-NEXT: Running analysis: RegionInfoAnalysis on foo
+; CHECK-O3-NEXT: Running analysis: DominanceFrontierAnalysis on foo
; CHECK-EXT: Running pass: {{.*}}::Bye
; CHECK-O-NEXT: Running pass: LoopSimplifyPass
; CHECK-O-NEXT: Running pass: LCSSAPass
Index: llvm/lib/Passes/PassBuilderPipelines.cpp
===================================================================
--- llvm/lib/Passes/PassBuilderPipelines.cpp
+++ llvm/lib/Passes/PassBuilderPipelines.cpp
@@ -672,15 +672,6 @@
FPM.addPass(InstCombinePass());
invokePeepholeEPCallbacks(FPM, Level);
- // Don't add CHR pass for CSIRInstr build in PostLink as the profile
- // is still the same as the PreLink compilation.
- if (EnableCHR && Level == OptimizationLevel::O3 && PGOOpt &&
- ((PGOOpt->Action == PGOOptions::IRUse &&
- (Phase != ThinOrFullLTOPhase::ThinLTOPostLink ||
- PGOOpt->CSAction != PGOOptions::CSIRInstr)) ||
- PGOOpt->Action == PGOOptions::SampleUse))
- FPM.addPass(ControlHeightReductionPass());
-
return FPM;
}
@@ -1297,6 +1288,11 @@
OptimizePM.addPass(EarlyCSEPass());
}
+ if (EnableCHR && Level == OptimizationLevel::O3 && PGOOpt &&
+ (PGOOpt->Action == PGOOptions::IRUse ||
+ PGOOpt->Action == PGOOptions::SampleUse))
+ OptimizePM.addPass(ControlHeightReductionPass());
+
// FIXME: We need to run some loop optimizations to re-rotate loops after
// simplifycfg and others undo their rotation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143424.498167.patch
Type: text/x-patch
Size: 4192 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230216/c2d6a4bf/attachment.bin>
More information about the llvm-commits
mailing list