Author: Hari Limaye Date: 2024-10-10T15:01:50+01:00 New Revision: ecf019eb29dafbe4c649f2fb4d34d3d238419e40
URL: https://github.com/llvm/llvm-project/commit/ecf019eb29dafbe4c649f2fb4d34d3d238419e40 DIFF: https://github.com/llvm/llvm-project/commit/ecf019eb29dafbe4c649f2fb4d34d3d238419e40.diff LOG: Revert "[LTO] Run Argument Promotion before IPSCCP (#111163)" This reverts commit b9754e9d285e6c056f04e00cc792c572d012ec02. 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 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits