[llvm] 0a0f100 - Revert "[LTO] Run Argument Promotion before IPSCCP" (#111839)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 10 07:03:06 PDT 2024
Author: Hari Limaye
Date: 2024-10-10T15:03:01+01:00
New Revision: 0a0f100a70583725428ec317138b09f935a2b9bb
URL: https://github.com/llvm/llvm-project/commit/0a0f100a70583725428ec317138b09f935a2b9bb
DIFF: https://github.com/llvm/llvm-project/commit/0a0f100a70583725428ec317138b09f935a2b9bb.diff
LOG: Revert "[LTO] Run Argument Promotion before IPSCCP" (#111839)
Reverts llvm/llvm-project#111163, as this was merged prematurely.
Added:
Modified:
llvm/lib/Passes/PassBuilderPipelines.cpp
llvm/test/Other/new-pm-lto-defaults.ll
Removed:
################################################################################
diff --git a/llvm/lib/Passes/PassBuilderPipelines.cpp b/llvm/lib/Passes/PassBuilderPipelines.cpp
index cdb9431c755bce..8f151a99b11709 100644
--- a/llvm/lib/Passes/PassBuilderPipelines.cpp
+++ b/llvm/lib/Passes/PassBuilderPipelines.cpp
@@ -1831,15 +1831,6 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level,
MPM.addPass(PGOIndirectCallPromotion(
true /* InLTO */, PGOOpt && PGOOpt->Action == PGOOptions::SampleUse));
- // Promoting by-reference arguments to by-value exposes more constants to
- // IPSCCP.
- MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(
- PostOrderFunctionAttrsPass(/*SkipNonRecursive*/ true)));
- MPM.addPass(
- createModuleToPostOrderCGSCCPassAdaptor(ArgumentPromotionPass()));
- MPM.addPass(
- createModuleToFunctionPassAdaptor(SROAPass(SROAOptions::ModifyCFG)));
-
// Propagate constants at call sites into the functions they call. This
// opens opportunities for globalopt (and inlining) by substituting function
// pointers passed as arguments to direct uses of functions.
diff --git a/llvm/test/Other/new-pm-lto-defaults.ll b/llvm/test/Other/new-pm-lto-defaults.ll
index 2dd754ecef4d7b..5543472df685b0 100644
--- a/llvm/test/Other/new-pm-lto-defaults.ll
+++ b/llvm/test/Other/new-pm-lto-defaults.ll
@@ -41,17 +41,14 @@
; CHECK-O23SZ-NEXT: PGOIndirectCallPromotion
; CHECK-O23SZ-NEXT: Running analysis: ProfileSummaryAnalysis
; CHECK-O23SZ-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis
+; CHECK-O23SZ-NEXT: Running pass: IPSCCPPass
+; CHECK-O23SZ-NEXT: Running analysis: AssumptionAnalysis on foo
+; CHECK-O23SZ-NEXT: Running pass: CalledValuePropagationPass
; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}SCC
; CHECK-O-NEXT: Running analysis: LazyCallGraphAnalysis
; CHECK-O1-NEXT: Running analysis: TargetLibraryAnalysis
; CHECK-O-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph{{.*}}>
-; CHECK-O23SZ-NEXT: Running pass: PostOrderFunctionAttrsPass
-; CHECK-O23SZ-NEXT: Running pass: ArgumentPromotionPass
-; CHECK-O23SZ-NEXT: Running pass: SROAPass
-; CHECK-O23SZ-NEXT: Running analysis: AssumptionAnalysis on foo
-; CHECK-O23SZ-NEXT: Running pass: IPSCCPPass
-; CHECK-O23SZ-NEXT: Running pass: CalledValuePropagationPass
; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass
; CHECK-O-NEXT: Running analysis: AAManager
; CHECK-O-NEXT: Running analysis: BasicAA
More information about the llvm-commits
mailing list