llvm.org GIT mirror llvm / a3b8ce3
Revert part of r310296 to make it really NFC for instrumentation PGO. Summary: Part of r310296 will disable PGOIndirectCallPromotion in ThinLTO backend if PGOOpt is None. However, as PGOOpt is not passed down to ThinLTO backend for instrumentation based PGO, that change would actually disable ICP entirely in ThinLTO backend, making it behave differently in instrumentation PGO mode. This change reverts that change, and only disable ICP there when it is SamplePGO. Reviewers: davidxl Reviewed By: davidxl Subscribers: sanjoy, mehdi_amini, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D36566 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310550 91177308-0d34-0410-b5e6-96231b3b80d8 Dehao Chen 2 years ago
2 changed file(s) with 6 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
856856 // look unreferenced and are removed.
857857 // FIXME: move this into buildModuleSimplificationPipeline to merge the logic
858858 // with SamplePGO.
859 if (PGOOpt && !PGOOpt->ProfileUseFile.empty())
859 if (!PGOOpt || PGOOpt->SampleProfileFile.empty())
860860 MPM.addPass(PGOIndirectCallPromotion(true /* InLTO */,
861861 false /* SamplePGO */));
862862
5252 ; CHECK-O-NEXT: Running pass: ForceFunctionAttrsPass
5353 ; CHECK-DIS-NEXT: Running pass: ModuleToFunctionPassAdaptor<{{.*}}AddDiscriminatorsPass{{.*}}>
5454 ; CHECK-DIS-NEXT: Running analysis: InnerAnalysisManagerProxy
55 ; CHECK-POSTLINK-O-NEXT: Running pass: PGOIndirectCallPromotion
56 ; CHECK-POSTLINK-O-NEXT: Running analysis: ProfileSummaryAnalysis
57 ; CHECK-POSTLINK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
58 ; CHECK-POSTLINK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis
5559 ; CHECK-O-NEXT: Running pass: PassManager<{{.*}}Module{{.*}}>
5660 ; CHECK-O-NEXT: Starting llvm::Module pass manager run.
5761 ; CHECK-O-NEXT: Running pass: InferFunctionAttrsPass
5862 ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis
5963 ; CHECK-O-NEXT: Running pass: ModuleToFunctionPassAdaptor<{{.*}}PassManager{{.*}}>
6064 ; CHECK-PRELINK-O-NODIS-NEXT: Running analysis: InnerAnalysisManagerProxy
61 ; CHECK-POSTLINK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
6265 ; CHECK-O-NEXT: Starting llvm::Function pass manager run.
6366 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
6467 ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis
7780 ; CHECK-O-NEXT: Starting llvm::Function pass manager run.
7881 ; CHECK-O-NEXT: Running pass: InstCombinePass
7982 ; CHECK-PRELINK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis
80 ; CHECK-POSTLINK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis
8183 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
8284 ; CHECK-O-NEXT: Finished llvm::Function pass manager run.
8385 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA
8486 ; CHECK-O-NEXT: Running analysis: GlobalsAA
8587 ; CHECK-O-NEXT: Running analysis: CallGraphAnalysis
8688 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}ProfileSummaryAnalysis
87 ; CHECK-O-NEXT: Running analysis: ProfileSummaryAnalysis
89 ; CHECK-PRELINK-O-NEXT: Running analysis: ProfileSummaryAnalysis
8890 ; CHECK-O-NEXT: Running pass: ModuleToPostOrderCGSCCPassAdaptor<{{.*}}LazyCallGraph{{.*}}>
8991 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
9092 ; CHECK-O-NEXT: Running analysis: LazyCallGraphAnalysis