diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -1121,7 +1121,7 @@ MPM.addPass( MemorySanitizerPass({TrackOrigins, Recover, CompileKernel})); - FunctionPassManager FPM(CodeGenOpts.DebugPassManager); + FunctionPassManager FPM; FPM.addPass( MemorySanitizerPass({TrackOrigins, Recover, CompileKernel})); if (Level != PassBuilder::OptimizationLevel::O0) { @@ -1280,7 +1280,7 @@ PassInstrumentationCallbacks PIC; StandardInstrumentations SI(CodeGenOpts.DebugPassManager); SI.registerCallbacks(PIC, &FAM); - PassBuilder PB(CodeGenOpts.DebugPassManager, TM.get(), PTO, PGOOpt, &PIC); + PassBuilder PB(TM.get(), PTO, PGOOpt, &PIC); // Attempt to load pass plugins and register their callbacks with PB. for (auto &PluginFN : CodeGenOpts.PassPlugins) { @@ -1313,7 +1313,7 @@ PB.registerLoopAnalyses(LAM); PB.crossRegisterProxies(LAM, FAM, CGAM, MAM); - ModulePassManager MPM(CodeGenOpts.DebugPassManager); + ModulePassManager MPM; if (!CodeGenOpts.DisableLLVMPasses) { // Map our optimization levels into one of the distinct levels used to diff --git a/clang/test/CodeGen/lto-newpm-pipeline.c b/clang/test/CodeGen/lto-newpm-pipeline.c --- a/clang/test/CodeGen/lto-newpm-pipeline.c +++ b/clang/test/CodeGen/lto-newpm-pipeline.c @@ -25,34 +25,28 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -o /dev/null -fexperimental-new-pass-manager -fdebug-pass-manager -flto=thin -Oz %s 2>&1 | FileCheck %s \ // RUN: -check-prefix=CHECK-THIN-OPTIMIZED -// CHECK-FULL-O0: Starting llvm::Module pass manager run. // CHECK-FULL-O0: Running pass: AlwaysInlinerPass // CHECK-FULL-O0-NEXT: Running analysis: InnerAnalysisManagerProxy // CHECK-FULL-O0-NEXT: Running analysis: ProfileSummaryAnalysis // CHECK-FULL-O0-NEXT: Running pass: CanonicalizeAliasesPass // CHECK-FULL-O0-NEXT: Running pass: NameAnonGlobalPass // CHECK-FULL-O0-NEXT: Running pass: BitcodeWriterPass -// CHECK-FULL-O0: Finished llvm::Module pass manager run. -// CHECK-THIN-O0: Starting llvm::Module pass manager run. // CHECK-THIN-O0: Running pass: AlwaysInlinerPass // CHECK-THIN-O0-NEXT: Running analysis: InnerAnalysisManagerProxy // CHECK-THIN-O0-NEXT: Running analysis: ProfileSummaryAnalysis // CHECK-THIN-O0-NEXT: Running pass: CanonicalizeAliasesPass // CHECK-THIN-O0-NEXT: Running pass: NameAnonGlobalPass // CHECK-THIN-O0-NEXT: Running pass: ThinLTOBitcodeWriterPass -// CHECK-THIN-O0: Finished llvm::Module pass manager run. // TODO: The LTO pre-link pipeline currently invokes // buildPerModuleDefaultPipeline(), which contains LoopVectorizePass. // This may change as the pipeline gets implemented. -// CHECK-FULL-OPTIMIZED: Starting llvm::Function pass manager run. // CHECK-FULL-OPTIMIZED: Running pass: LoopVectorizePass // CHECK-FULL-OPTIMIZED: Running pass: BitcodeWriterPass // The ThinLTO pre-link pipeline shouldn't contain passes like // LoopVectorizePass. -// CHECK-THIN-OPTIMIZED: Starting llvm::Function pass manager run. // CHECK-THIN-OPTIMIZED-NOT: Running pass: LoopVectorizePass // CHECK-THIN-OPTIMIZED: Running pass: CanonicalizeAliasesPass // CHECK-THIN-OPTIMIZED: Running pass: NameAnonGlobalPass diff --git a/clang/test/CodeGen/thinlto-distributed-newpm.ll b/clang/test/CodeGen/thinlto-distributed-newpm.ll --- a/clang/test/CodeGen/thinlto-distributed-newpm.ll +++ b/clang/test/CodeGen/thinlto-distributed-newpm.ll @@ -19,7 +19,6 @@ ; RUN: -c -fthinlto-index=%t.o.thinlto.bc \ ; RUN: -o %t.native.o -x ir %t.o 2>&1 | FileCheck -check-prefixes=CHECK-O,CHECK-O3 %s --dump-input=fail -; CHECK-O: Starting {{.*}}Module pass manager run. ; CHECK-O: Running pass: WholeProgramDevirtPass ; CHECK-O: Running analysis: InnerAnalysisManagerProxy ; CHECK-O: Running pass: LowerTypeTestsPass @@ -30,7 +29,6 @@ ; CHECK-O: Running analysis: InnerAnalysisManagerProxy ; CHECK-O: Running analysis: OptimizationRemarkEmitterAnalysis on main ; CHECK-O: Running pass: InferFunctionAttrsPass -; CHECK-O: Starting {{.*}}Function pass manager run. ; CHECK-O: Running pass: LowerExpectIntrinsicPass on main ; CHECK-O: Running pass: SimplifyCFGPass on main ; CHECK-O: Running analysis: TargetIRAnalysis on main @@ -40,7 +38,6 @@ ; CHECK-O: Running pass: EarlyCSEPass on main ; CHECK-O: Running analysis: TargetLibraryAnalysis on main ; CHECK-O3: Running pass: CallSiteSplittingPass on main -; CHECK-O: Finished {{.*}}Function pass manager run. ; CHECK-O: Running pass: LowerTypeTestsPass ; CHECK-O: Running pass: IPSCCPPass ; CHECK-O: Running pass: CalledValuePropagationPass @@ -51,7 +48,6 @@ ; CHECK-O: Running analysis: DominatorTreeAnalysis on main ; CHECK-O: Running analysis: AssumptionAnalysis on main ; CHECK-O: Running pass: DeadArgumentEliminationPass -; CHECK-O: Starting {{.*}}Function pass manager run. ; CHECK-O: Running pass: InstCombinePass on main ; CHECK-O: Running analysis: TargetLibraryAnalysis on main ; CHECK-O: Running analysis: OptimizationRemarkEmitterAnalysis on main @@ -62,19 +58,16 @@ ; CHECK-O: Running analysis: TypeBasedAA on main ; CHECK-O: Running analysis: OuterAnalysisManagerProxy ; CHECK-O: Running pass: SimplifyCFGPass on main -; CHECK-O: Finished {{.*}}Function pass manager run. ; CHECK-O: Running analysis: InnerAnalysisManagerProxy ; CHECK-O: Running analysis: LazyCallGraphAnalysis ; CHECK-O: Running analysis: FunctionAnalysisManagerCGSCCProxy on (main) ; CHECK-O: Running analysis: OuterAnalysisManagerProxy -; CHECK-O: Starting CGSCC pass manager run. ; CHECK-O: Running pass: InlinerPass on (main) ; CHECK-O: Running pass: PostOrderFunctionAttrsPass on (main) ; CHECK-O: Invalidating analysis: DominatorTreeAnalysis on main ; CHECK-O: Invalidating analysis: BasicAA on main ; CHECK-O: Invalidating analysis: AAManager on main ; CHECK-O3: Running pass: ArgumentPromotionPass on (main) -; CHECK-O: Starting {{.*}}Function pass manager run. ; CHECK-O: Running pass: SROA on main ; These next two can appear in any order since they are accessed as parameters ; on the same call to SROA::runImpl @@ -96,17 +89,13 @@ ; CHECK-O: Running pass: SimplifyCFGPass on main ; CHECK-O: Running pass: ReassociatePass on main ; CHECK-O: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis -; CHECK-O: Starting {{.*}}Function pass manager run. ; CHECK-O: Running pass: LoopSimplifyPass on main ; CHECK-O: Running analysis: LoopAnalysis on main ; CHECK-O: Running pass: LCSSAPass on main -; CHECK-O: Finished {{.*}}Function pass manager run. ; CHECK-O: Running pass: SimplifyCFGPass on main ; CHECK-O: Running pass: InstCombinePass on main -; CHECK-O: Starting {{.*}}Function pass manager run. ; CHECK-O: Running pass: LoopSimplifyPass on main ; CHECK-O: Running pass: LCSSAPass on main -; CHECK-O: Finished {{.*}}Function pass manager run. ; CHECK-O: Running pass: SROA on main ; CHECK-O: Running pass: MergedLoadStoreMotionPass on main ; CHECK-O: Running pass: GVN on main @@ -120,14 +109,10 @@ ; CHECK-O: Running analysis: PostDominatorTreeAnalysis on main ; CHECK-O: Running pass: MemCpyOptPass on main ; CHECK-O: Running pass: DSEPass on main -; CHECK-O: Starting {{.*}}Function pass manager run. ; CHECK-O: Running pass: LoopSimplifyPass on main ; CHECK-O: Running pass: LCSSAPass on main -; CHECK-O: Finished {{.*}}Function pass manager run. ; CHECK-O: Running pass: SimplifyCFGPass on main ; CHECK-O: Running pass: InstCombinePass on main -; CHECK-O: Finished {{.*}}Function pass manager run. -; CHECK-O: Finished CGSCC pass manager run. ; CHECK-O: Invalidating analysis: DominatorTreeAnalysis on main ; CHECK-O: Invalidating analysis: BasicAA on main ; CHECK-O: Invalidating analysis: AAManager on main @@ -144,14 +129,11 @@ ; CHECK-O: Running pass: ReversePostOrderFunctionAttrsPass ; CHECK-O: Running analysis: CallGraphAnalysis ; CHECK-O: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA -; CHECK-O: Starting {{.*}}Function pass manager run. ; CHECK-O: Running pass: Float2IntPass on main ; CHECK-O: Running pass: LowerConstantIntrinsicsPass on main -; CHECK-O: Starting {{.*}}Function pass manager run. ; CHECK-O: Running pass: LoopSimplifyPass on main ; CHECK-O: Running analysis: LoopAnalysis on main ; CHECK-O: Running pass: LCSSAPass on main -; CHECK-O: Finished {{.*}}Function pass manager run. ; CHECK-O: Running analysis: MemorySSAAnalysis on main ; CHECK-O: Running analysis: AAManager on main ; CHECK-O: Running analysis: BasicAA on main @@ -175,10 +157,8 @@ ; CHECK-O: Running pass: WarnMissedTransformationsPass on main ; CHECK-O: Running pass: InstCombinePass on main ; CHECK-O: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis -; CHECK-O: Starting {{.*}}Function pass manager run. ; CHECK-O: Running pass: LoopSimplifyPass on main ; CHECK-O: Running pass: LCSSAPass on main -; CHECK-O: Finished {{.*}}Function pass manager run. ; CHECK-O: Running pass: LICMPass on Loop at depth 1 containing: %b ; CHECK-O: Running pass: AlignmentFromAssumptionsPass on main ; CHECK-O: Running pass: LoopSinkPass on main @@ -186,11 +166,9 @@ ; CHECK-O: Running pass: DivRemPairsPass on main ; CHECK-O: Running pass: SimplifyCFGPass on main ; CHECK-O: Running pass: SpeculateAroundPHIsPass on main -; CHECK-O: Finished {{.*}}Function pass manager run. ; CHECK-O: Running pass: CGProfilePass ; CHECK-O: Running pass: GlobalDCEPass ; CHECK-O: Running pass: ConstantMergePass -; CHECK-O: Finished {{.*}}Module pass manager run. target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-grtev4-linux-gnu" diff --git a/clang/test/CodeGenCoroutines/coro-newpm-pipeline.cpp b/clang/test/CodeGenCoroutines/coro-newpm-pipeline.cpp --- a/clang/test/CodeGenCoroutines/coro-newpm-pipeline.cpp +++ b/clang/test/CodeGenCoroutines/coro-newpm-pipeline.cpp @@ -8,24 +8,18 @@ // RUN: -fexperimental-new-pass-manager -fdebug-pass-manager -fcoroutines-ts \ // RUN: -O1 %s 2>&1 | FileCheck %s // -// CHECK: Starting llvm::Module pass manager run. // CHECK: Running pass:{{.*}}CoroEarlyPass // // The first coro-split pass enqueues a second run of the entire CGSCC pipeline. -// CHECK: Starting CGSCC pass manager run. // CHECK: Running pass: CoroSplitPass on (_Z3foov) // CHECK: Running pass:{{.*}}CoroElidePass{{.*}} on {{.*}}_Z3foov{{.*}} -// CHECK: Finished CGSCC pass manager run. // // The second coro-split pass splits coroutine 'foo' into funclets // 'foo.resume', 'foo.destroy', and 'foo.cleanup'. -// CHECK: Starting CGSCC pass manager run. // CHECK: Running pass: CoroSplitPass on (_Z3foov) // CHECK: Running pass:{{.*}}CoroElidePass{{.*}} on {{.*}}_Z3foov{{.*}} -// CHECK: Finished CGSCC pass manager run. // // CHECK: Running pass:{{.*}}CoroCleanupPass -// CHECK: Finished llvm::Module pass manager run. namespace std { namespace experimental { diff --git a/lld/test/COFF/lto-new-pass-manager.ll b/lld/test/COFF/lto-new-pass-manager.ll --- a/lld/test/COFF/lto-new-pass-manager.ll +++ b/lld/test/COFF/lto-new-pass-manager.ll @@ -2,14 +2,10 @@ ; RUN: llvm-as %s -o %t.obj ; RUN: lld-link %t.obj -entry:main -opt:ltonewpassmanager -opt:ltodebugpassmanager 2>&1 | FileCheck %s --check-prefix=ENABLED -; ENABLED: Starting llvm::Module pass manager run. -; ENABLED: Finished llvm::Module pass manager run. ; Passing -time just to avoid empty FileCheck input ; RUN: lld-link %t.obj -entry:main -time -opt:ltonewpassmanager -opt:ltodebugpassmanager -opt:noltonewpassmanager 2>&1 | FileCheck %s --check-prefix=DISABLED ; RUN: lld-link %t.obj -entry:main -time -opt:ltonewpassmanager -opt:ltodebugpassmanager -opt:noltodebugpassmanager 2>&1 | FileCheck %s --check-prefix=DISABLED -; DISABLED-NOT: Starting llvm::Module pass manager run. -; DISABLED-NOT: Finished llvm::Module pass manager run. target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-windows-msvc19.11.0" diff --git a/lld/test/ELF/lto/new-pass-manager.ll b/lld/test/ELF/lto/new-pass-manager.ll --- a/lld/test/ELF/lto/new-pass-manager.ll +++ b/lld/test/ELF/lto/new-pass-manager.ll @@ -9,9 +9,6 @@ ; RUN: ld.lld --no-lto-legacy-pass-manager --lto-legacy-pass-manager --lto-debug-pass-manager -o /dev/null %t.o 2>&1 | FileCheck %s --check-prefix=LEGACY ; RUN: ld.lld --plugin-opt=legacy-pass-manager --plugin-opt=debug-pass-manager -o /dev/null %t.o 2>&1 | FileCheck %s --check-prefix=LEGACY -; CHECK: Starting llvm::Module pass manager run -; CHECK: Finished llvm::Module pass manager run -; LEGACY-NOT: Starting llvm::Module pass manager run target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/wasm/lto/new-pass-manager.ll b/lld/test/wasm/lto/new-pass-manager.ll --- a/lld/test/wasm/lto/new-pass-manager.ll +++ b/lld/test/wasm/lto/new-pass-manager.ll @@ -2,9 +2,6 @@ ; RUN: wasm-ld --no-lto-legacy-pass-manager --lto-debug-pass-manager -o /dev/null %t.bc 2>&1 | FileCheck %s ; RUN: wasm-ld --no-lto-legacy-pass-manager --lto-debug-pass-manager --lto-legacy-pass-manager -o /dev/null %t.bc 2>&1 | FileCheck %s --allow-empty --check-prefix=LPM -; CHECK: Starting llvm::Module pass manager run -; CHECK: Finished llvm::Module pass manager run -; LPM-NOT: Starting llvm::Module pass manager run target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128" target triple = "wasm32-unknown-unknown" diff --git a/llvm/include/llvm/CodeGen/MachinePassManager.h b/llvm/include/llvm/CodeGen/MachinePassManager.h --- a/llvm/include/llvm/CodeGen/MachinePassManager.h +++ b/llvm/include/llvm/CodeGen/MachinePassManager.h @@ -136,7 +136,7 @@ MachineFunctionPassManager(bool DebugLogging = false, bool RequireCodeGenSCCOrder = false, bool VerifyMachineFunction = false) - : Base(DebugLogging), RequireCodeGenSCCOrder(RequireCodeGenSCCOrder), + : Base(), RequireCodeGenSCCOrder(RequireCodeGenSCCOrder), VerifyMachineFunction(VerifyMachineFunction) {} MachineFunctionPassManager(MachineFunctionPassManager &&) = default; MachineFunctionPassManager & diff --git a/llvm/include/llvm/IR/PassManager.h b/llvm/include/llvm/IR/PassManager.h --- a/llvm/include/llvm/IR/PassManager.h +++ b/llvm/include/llvm/IR/PassManager.h @@ -467,21 +467,16 @@ PassManager> { public: /// Construct a pass manager. - /// - /// If \p DebugLogging is true, we'll log our progress to llvm::dbgs(). - explicit PassManager(bool DebugLogging = false) : DebugLogging(DebugLogging) {} + explicit PassManager() {} // FIXME: These are equivalent to the default move constructor/move // assignment. However, using = default triggers linker errors due to the // explicit instantiations below. Find away to use the default and remove the // duplicated code here. - PassManager(PassManager &&Arg) - : Passes(std::move(Arg.Passes)), - DebugLogging(std::move(Arg.DebugLogging)) {} + PassManager(PassManager &&Arg) : Passes(std::move(Arg.Passes)) {} PassManager &operator=(PassManager &&RHS) { Passes = std::move(RHS.Passes); - DebugLogging = std::move(RHS.DebugLogging); return *this; } @@ -499,9 +494,6 @@ detail::getAnalysisResult( AM, IR, std::tuple(ExtraArgs...)); - if (DebugLogging) - dbgs() << "Starting " << getTypeName() << " pass manager run.\n"; - for (unsigned Idx = 0, Size = Passes.size(); Idx != Size; ++Idx) { auto *P = Passes[Idx].get(); @@ -542,9 +534,6 @@ // need to inspect each one individually. PA.preserveSet>(); - if (DebugLogging) - dbgs() << "Finished " << getTypeName() << " pass manager run.\n"; - return PA; } @@ -580,9 +569,6 @@ detail::PassConcept; std::vector> Passes; - - /// Flag indicating whether we should do debug logging. - bool DebugLogging; }; extern template class PassManager; diff --git a/llvm/include/llvm/Passes/PassBuilder.h b/llvm/include/llvm/Passes/PassBuilder.h --- a/llvm/include/llvm/Passes/PassBuilder.h +++ b/llvm/include/llvm/Passes/PassBuilder.h @@ -137,7 +137,6 @@ /// of the built-in passes, and those may reference these members during /// construction. class PassBuilder { - bool DebugLogging; TargetMachine *TM; PipelineTuningOptions PTO; Optional PGOOpt; @@ -267,7 +266,7 @@ unsigned getSizeLevel() const { return SizeLevel; } }; - explicit PassBuilder(bool DebugLogging = false, TargetMachine *TM = nullptr, + explicit PassBuilder(TargetMachine *TM = nullptr, PipelineTuningOptions PTO = PipelineTuningOptions(), Optional PGOOpt = None, PassInstrumentationCallbacks *PIC = nullptr); @@ -688,8 +687,8 @@ /// text, this Callback should be used to determine the appropriate stack of /// PassManagers and populate the passed ModulePassManager. void registerParseTopLevelPipelineCallback( - const std::function, - bool DebugLogging)> &C); + const std::function)> + &C); /// Add PGOInstrumenation passes for O0 only. void addPGOInstrPassesForO0(ModulePassManager &MPM, bool RunProfileGen, @@ -760,9 +759,8 @@ ArrayRef)>, 2> ModulePipelineParsingCallbacks; - SmallVector, - bool DebugLogging)>, - 2> + SmallVector< + std::function)>, 2> TopLevelPipelineParsingCallbacks; // CGSCC callbacks SmallVector, 2> diff --git a/llvm/include/llvm/Target/TargetMachine.h b/llvm/include/llvm/Target/TargetMachine.h --- a/llvm/include/llvm/Target/TargetMachine.h +++ b/llvm/include/llvm/Target/TargetMachine.h @@ -330,8 +330,7 @@ /// Allow the target to modify the pass pipeline with New Pass Manager /// (similar to adjustPassManager for Legacy Pass manager). - virtual void registerPassBuilderCallbacks(PassBuilder &, - bool DebugPassManager) {} + virtual void registerPassBuilderCallbacks(PassBuilder &) {} /// Allow the target to register alias analyses with the AAManager for use /// with the new pass manager. Only affects the "default" AAManager. diff --git a/llvm/include/llvm/Transforms/IPO/Inliner.h b/llvm/include/llvm/Transforms/IPO/Inliner.h --- a/llvm/include/llvm/Transforms/IPO/Inliner.h +++ b/llvm/include/llvm/Transforms/IPO/Inliner.h @@ -119,8 +119,7 @@ : public PassInfoMixin { public: ModuleInlinerWrapperPass( - InlineParams Params = getInlineParams(), bool Debugging = false, - bool MandatoryFirst = true, + InlineParams Params = getInlineParams(), bool MandatoryFirst = true, InliningAdvisorMode Mode = InliningAdvisorMode::Default, unsigned MaxDevirtIterations = 0); ModuleInlinerWrapperPass(ModuleInlinerWrapperPass &&Arg) = default; diff --git a/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h b/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h --- a/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h +++ b/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h @@ -73,11 +73,7 @@ PassManager> { public: - /// Construct a pass manager. - /// - /// If \p DebugLogging is true, we'll log our progress to llvm::dbgs(). - explicit PassManager(bool DebugLogging = false) - : DebugLogging(DebugLogging) {} + explicit PassManager() {} // FIXME: These are equivalent to the default move constructor/move // assignment. However, using = default triggers linker errors due to the @@ -86,14 +82,12 @@ PassManager(PassManager &&Arg) : IsLoopNestPass(std::move(Arg.IsLoopNestPass)), LoopPasses(std::move(Arg.LoopPasses)), - LoopNestPasses(std::move(Arg.LoopNestPasses)), - DebugLogging(std::move(Arg.DebugLogging)) {} + LoopNestPasses(std::move(Arg.LoopNestPasses)) {} PassManager &operator=(PassManager &&RHS) { IsLoopNestPass = std::move(RHS.IsLoopNestPass); LoopPasses = std::move(RHS.LoopPasses); LoopNestPasses = std::move(RHS.LoopNestPasses); - DebugLogging = std::move(RHS.DebugLogging); return *this; } @@ -174,9 +168,6 @@ std::vector> LoopPasses; std::vector> LoopNestPasses; - /// Flag indicating whether we should do debug logging. - bool DebugLogging; - /// Run either a loop pass or a loop-nest pass. Returns `None` if /// PassInstrumentation's BeforePass returns false. Otherwise, returns the /// preserved analyses of the pass. @@ -412,9 +403,8 @@ explicit FunctionToLoopPassAdaptor(std::unique_ptr Pass, bool UseMemorySSA = false, bool UseBlockFrequencyInfo = false, - bool DebugLogging = false, bool LoopNestMode = false) - : Pass(std::move(Pass)), LoopCanonicalizationFPM(DebugLogging), + : Pass(std::move(Pass)), LoopCanonicalizationFPM(), UseMemorySSA(UseMemorySSA), UseBlockFrequencyInfo(UseBlockFrequencyInfo), LoopNestMode(LoopNestMode) { @@ -447,14 +437,13 @@ inline std::enable_if_t::value, FunctionToLoopPassAdaptor> createFunctionToLoopPassAdaptor(LoopPassT Pass, bool UseMemorySSA = false, - bool UseBlockFrequencyInfo = false, - bool DebugLogging = false) { + bool UseBlockFrequencyInfo = false) { using PassModelT = detail::PassModel; return FunctionToLoopPassAdaptor( std::make_unique(std::move(Pass)), UseMemorySSA, - UseBlockFrequencyInfo, DebugLogging, false); + UseBlockFrequencyInfo, false); } /// If \p Pass is a loop-nest pass, \p Pass will first be wrapped into a @@ -463,17 +452,15 @@ inline std::enable_if_t::value, FunctionToLoopPassAdaptor> createFunctionToLoopPassAdaptor(LoopNestPassT Pass, bool UseMemorySSA = false, - bool UseBlockFrequencyInfo = false, - bool DebugLogging = false) { - LoopPassManager LPM(DebugLogging); + bool UseBlockFrequencyInfo = false) { + LoopPassManager LPM; LPM.addPass(std::move(Pass)); using PassModelT = detail::PassModel; return FunctionToLoopPassAdaptor(std::make_unique(std::move(LPM)), - UseMemorySSA, UseBlockFrequencyInfo, - DebugLogging, true); + UseMemorySSA, UseBlockFrequencyInfo, true); } /// If \p Pass is an instance of \c LoopPassManager, the returned adaptor will @@ -482,8 +469,7 @@ inline FunctionToLoopPassAdaptor createFunctionToLoopPassAdaptor(LoopPassManager LPM, bool UseMemorySSA, - bool UseBlockFrequencyInfo, - bool DebugLogging) { + bool UseBlockFrequencyInfo) { // Check if LPM contains any loop pass and if it does not, returns an adaptor // in loop-nest mode. using PassModelT = @@ -493,7 +479,7 @@ bool LoopNestMode = (LPM.getNumLoopPasses() == 0); return FunctionToLoopPassAdaptor(std::make_unique(std::move(LPM)), UseMemorySSA, UseBlockFrequencyInfo, - DebugLogging, LoopNestMode); + LoopNestMode); } /// Pass for printing a loop's contents as textual IR. diff --git a/llvm/lib/Analysis/CGSCCPassManager.cpp b/llvm/lib/Analysis/CGSCCPassManager.cpp --- a/llvm/lib/Analysis/CGSCCPassManager.cpp +++ b/llvm/lib/Analysis/CGSCCPassManager.cpp @@ -69,9 +69,6 @@ PreservedAnalyses PA = PreservedAnalyses::all(); - if (DebugLogging) - dbgs() << "Starting CGSCC pass manager run.\n"; - // The SCC may be refined while we are running passes over it, so set up // a pointer that we can update. LazyCallGraph::SCC *C = &InitialC; @@ -142,9 +139,6 @@ // one individually. PA.preserveSet>(); - if (DebugLogging) - dbgs() << "Finished CGSCC pass manager run.\n"; - return PA; } diff --git a/llvm/lib/CodeGen/MachinePassManager.cpp b/llvm/lib/CodeGen/MachinePassManager.cpp --- a/llvm/lib/CodeGen/MachinePassManager.cpp +++ b/llvm/lib/CodeGen/MachinePassManager.cpp @@ -49,11 +49,6 @@ }); } - if (DebugLogging) { - dbgs() << "Starting " << getTypeName() - << " pass manager run.\n"; - } - for (auto &F : InitializationFuncs) { if (auto Err = F(M, MFAM)) return Err; @@ -64,9 +59,6 @@ do { // Run machine module passes for (; MachineModulePasses.count(Idx) && Idx != Size; ++Idx) { - if (DebugLogging) - dbgs() << "Running pass: " << Passes[Idx]->name() << " on " - << M.getName() << '\n'; if (auto Err = MachineModulePasses.at(Idx)(M, MFAM)) return Err; } @@ -110,11 +102,6 @@ return Err; } - if (DebugLogging) { - dbgs() << "Finished " << getTypeName() - << " pass manager run.\n"; - } - return Error::success(); } diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp --- a/llvm/lib/LTO/LTOBackend.cpp +++ b/llvm/lib/LTO/LTOBackend.cpp @@ -229,7 +229,7 @@ PassInstrumentationCallbacks PIC; StandardInstrumentations SI(Conf.DebugPassManager); SI.registerCallbacks(PIC, &FAM); - PassBuilder PB(Conf.DebugPassManager, TM, Conf.PTO, PGOOpt, &PIC); + PassBuilder PB(TM, Conf.PTO, PGOOpt, &PIC); RegisterPassPlugins(Conf.PassPlugins, PB); @@ -259,7 +259,7 @@ PB.registerLoopAnalyses(LAM); PB.crossRegisterProxies(LAM, FAM, CGAM, MAM); - ModulePassManager MPM(Conf.DebugPassManager); + ModulePassManager MPM; if (!Conf.DisableVerify) MPM.addPass(VerifierPass()); diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp --- a/llvm/lib/Passes/PassBuilder.cpp +++ b/llvm/lib/Passes/PassBuilder.cpp @@ -441,12 +441,12 @@ } // namespace -PassBuilder::PassBuilder(bool DebugLogging, TargetMachine *TM, - PipelineTuningOptions PTO, Optional PGOOpt, +PassBuilder::PassBuilder(TargetMachine *TM, PipelineTuningOptions PTO, + Optional PGOOpt, PassInstrumentationCallbacks *PIC) - : DebugLogging(DebugLogging), TM(TM), PTO(PTO), PGOOpt(PGOOpt), PIC(PIC) { + : TM(TM), PTO(PTO), PGOOpt(PGOOpt), PIC(PIC) { if (TM) - TM->registerPassBuilderCallbacks(*this, DebugLogging); + TM->registerPassBuilderCallbacks(*this); if (PIC && shouldPopulateClassToPassNames()) { #define MODULE_PASS(NAME, CREATE_PASS) \ PIC->addClassToPassName(decltype(CREATE_PASS)::name(), NAME); @@ -528,7 +528,7 @@ PassBuilder::buildO1FunctionSimplificationPipeline(OptimizationLevel Level, ThinOrFullLTOPhase Phase) { - FunctionPassManager FPM(DebugLogging); + FunctionPassManager FPM; // Form SSA out of local memory accesses after breaking apart aggregates into // scalars. @@ -561,7 +561,7 @@ // used. We have `LoopSimplifyCFGPass` which isn't yet powerful enough yet to // fully replace `SimplifyCFGPass`, and the closest to the other we have is // `LoopInstSimplify`. - LoopPassManager LPM1(DebugLogging), LPM2(DebugLogging); + LoopPassManager LPM1, LPM2; // Simplify the loop body. We do this initially to clean up after other loop // passes run, either when iterating on a loop or on inner loops with @@ -609,18 +609,18 @@ // this once as it is immutable. FPM.addPass( RequireAnalysisPass()); - FPM.addPass(createFunctionToLoopPassAdaptor( - std::move(LPM1), EnableMSSALoopDependency, /*UseBlockFrequencyInfo=*/true, - DebugLogging)); + FPM.addPass(createFunctionToLoopPassAdaptor(std::move(LPM1), + EnableMSSALoopDependency, + /*UseBlockFrequencyInfo=*/true)); FPM.addPass(SimplifyCFGPass()); FPM.addPass(InstCombinePass()); if (EnableLoopFlatten) FPM.addPass(LoopFlattenPass()); // The loop passes in LPM2 (LoopFullUnrollPass) do not preserve MemorySSA. // *All* loop passes must preserve it, in order to be able to use it. - FPM.addPass(createFunctionToLoopPassAdaptor( - std::move(LPM2), /*UseMemorySSA=*/false, /*UseBlockFrequencyInfo=*/false, - DebugLogging)); + FPM.addPass(createFunctionToLoopPassAdaptor(std::move(LPM2), + /*UseMemorySSA=*/false, + /*UseBlockFrequencyInfo=*/false)); // Delete small array after loop unroll. FPM.addPass(SROA()); @@ -670,7 +670,7 @@ if (Level.getSpeedupLevel() == 1) return buildO1FunctionSimplificationPipeline(Level, Phase); - FunctionPassManager FPM(DebugLogging); + FunctionPassManager FPM; // Form SSA out of local memory accesses after breaking apart aggregates into // scalars. @@ -734,7 +734,7 @@ // used. We have `LoopSimplifyCFGPass` which isn't yet powerful enough yet to // fully replace `SimplifyCFGPass`, and the closest to the other we have is // `LoopInstSimplify`. - LoopPassManager LPM1(DebugLogging), LPM2(DebugLogging); + LoopPassManager LPM1, LPM2; // Simplify the loop body. We do this initially to clean up after other loop // passes run, either when iterating on a loop or on inner loops with @@ -784,9 +784,9 @@ // this once as it is immutable. FPM.addPass( RequireAnalysisPass()); - FPM.addPass(createFunctionToLoopPassAdaptor( - std::move(LPM1), EnableMSSALoopDependency, /*UseBlockFrequencyInfo=*/true, - DebugLogging)); + FPM.addPass(createFunctionToLoopPassAdaptor(std::move(LPM1), + EnableMSSALoopDependency, + /*UseBlockFrequencyInfo=*/true)); FPM.addPass(SimplifyCFGPass()); FPM.addPass(InstCombinePass()); if (EnableLoopFlatten) @@ -794,9 +794,9 @@ // The loop passes in LPM2 (LoopIdiomRecognizePass, IndVarSimplifyPass, // LoopDeletionPass and LoopFullUnrollPass) do not preserve MemorySSA. // *All* loop passes must preserve it, in order to be able to use it. - FPM.addPass(createFunctionToLoopPassAdaptor( - std::move(LPM2), /*UseMemorySSA=*/false, /*UseBlockFrequencyInfo=*/false, - DebugLogging)); + FPM.addPass(createFunctionToLoopPassAdaptor(std::move(LPM2), + /*UseMemorySSA=*/false, + /*UseBlockFrequencyInfo=*/false)); // Delete small array after loop unroll. FPM.addPass(SROA()); @@ -839,7 +839,7 @@ FPM.addPass(DSEPass()); FPM.addPass(createFunctionToLoopPassAdaptor( LICMPass(PTO.LicmMssaOptCap, PTO.LicmMssaNoAccForPromotionCap), - EnableMSSALoopDependency, /*UseBlockFrequencyInfo=*/true, DebugLogging)); + EnableMSSALoopDependency, /*UseBlockFrequencyInfo=*/true)); if (PTO.Coroutines) FPM.addPass(CoroElidePass()); @@ -881,7 +881,7 @@ // performance testing. // FIXME: this comment is cargo culted from the old pass manager, revisit). IP.HintThreshold = Level.isOptimizingForSize() ? PreInlineThreshold : 325; - ModuleInlinerWrapperPass MIWP(IP, DebugLogging); + ModuleInlinerWrapperPass MIWP(IP); CGSCCPassManager &CGPipeline = MIWP.getPM(); FunctionPassManager FPM; @@ -917,7 +917,7 @@ // Disable header duplication in loop rotation at -Oz. FPM.addPass(createFunctionToLoopPassAdaptor( LoopRotatePass(Level != OptimizationLevel::Oz), EnableMSSALoopDependency, - /*UseBlockFrequencyInfo=*/false, DebugLogging)); + /*UseBlockFrequencyInfo=*/false)); MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); // Add the profile lowering pass. @@ -971,8 +971,7 @@ if (PGOOpt) IP.EnableDeferral = EnablePGOInlineDeferral; - ModuleInlinerWrapperPass MIWP(IP, DebugLogging, - PerformMandatoryInliningsFirst, + ModuleInlinerWrapperPass MIWP(IP, PerformMandatoryInliningsFirst, UseInlineAdvisor, MaxDevirtIterations); // Require the GlobalsAA analysis for the module so we can query it within @@ -1027,7 +1026,7 @@ ModulePassManager PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, ThinOrFullLTOPhase Phase) { - ModulePassManager MPM(DebugLogging); + ModulePassManager MPM; // Place pseudo probe instrumentation as the first pass of the pipeline to // minimize the impact of optimization changes. @@ -1067,7 +1066,7 @@ // Create an early function pass manager to cleanup the output of the // frontend. - FunctionPassManager EarlyFPM(DebugLogging); + FunctionPassManager EarlyFPM; // Lower llvm.expect to metadata before attempting transforms. // Compare/branch metadata may alter the behavior of passes like SimplifyCFG. EarlyFPM.addPass(LowerExpectIntrinsicPass()); @@ -1152,7 +1151,7 @@ // Create a small function pass pipeline to cleanup after all the global // optimizations. - FunctionPassManager GlobalCleanupPM(DebugLogging); + FunctionPassManager GlobalCleanupPM; GlobalCleanupPM.addPass(InstCombinePass()); invokePeepholeEPCallbacks(GlobalCleanupPM, Level); @@ -1190,7 +1189,7 @@ ModulePassManager PassBuilder::buildModuleOptimizationPipeline(OptimizationLevel Level, bool LTOPreLink) { - ModulePassManager MPM(DebugLogging); + ModulePassManager MPM; // Optimize globals now that the module is fully simplified. MPM.addPass(GlobalOptPass()); @@ -1245,7 +1244,7 @@ // memory operations. MPM.addPass(RequireAnalysisPass()); - FunctionPassManager OptimizePM(DebugLogging); + FunctionPassManager OptimizePM; OptimizePM.addPass(Float2IntPass()); OptimizePM.addPass(LowerConstantIntrinsicsPass()); @@ -1269,7 +1268,7 @@ OptimizePM.addPass(createFunctionToLoopPassAdaptor( LoopRotatePass(Level != OptimizationLevel::Oz, LTOPreLink), EnableMSSALoopDependency, - /*UseBlockFrequencyInfo=*/false, DebugLogging)); + /*UseBlockFrequencyInfo=*/false)); // Distribute loops to allow partial vectorization. I.e. isolate dependences // into separate loop that would otherwise inhibit vectorization. This is @@ -1302,14 +1301,14 @@ OptimizePM.addPass(EarlyCSEPass()); OptimizePM.addPass(CorrelatedValuePropagationPass()); OptimizePM.addPass(InstCombinePass()); - LoopPassManager LPM(DebugLogging); + LoopPassManager LPM; LPM.addPass(LICMPass(PTO.LicmMssaOptCap, PTO.LicmMssaNoAccForPromotionCap)); LPM.addPass( SimpleLoopUnswitchPass(/* NonTrivial */ Level == OptimizationLevel::O3)); OptimizePM.addPass(RequireAnalysisPass()); OptimizePM.addPass(createFunctionToLoopPassAdaptor( - std::move(LPM), EnableMSSALoopDependency, /*UseBlockFrequencyInfo=*/true, - DebugLogging)); + std::move(LPM), EnableMSSALoopDependency, + /*UseBlockFrequencyInfo=*/true)); OptimizePM.addPass(SimplifyCFGPass()); OptimizePM.addPass(InstCombinePass()); } @@ -1360,7 +1359,7 @@ OptimizePM.addPass(RequireAnalysisPass()); OptimizePM.addPass(createFunctionToLoopPassAdaptor( LICMPass(PTO.LicmMssaOptCap, PTO.LicmMssaNoAccForPromotionCap), - EnableMSSALoopDependency, /*UseBlockFrequencyInfo=*/true, DebugLogging)); + EnableMSSALoopDependency, /*UseBlockFrequencyInfo=*/true)); // Now that we've vectorized and unrolled loops, we may have more refined // alignment information, try to re-derive it here. @@ -1440,7 +1439,7 @@ assert(Level != OptimizationLevel::O0 && "Must request optimizations for the default pipeline!"); - ModulePassManager MPM(DebugLogging); + ModulePassManager MPM; // Convert @llvm.global.annotations to !annotation metadata. MPM.addPass(Annotation2MetadataPass()); @@ -1480,7 +1479,7 @@ assert(Level != OptimizationLevel::O0 && "Must request optimizations for the default pipeline!"); - ModulePassManager MPM(DebugLogging); + ModulePassManager MPM; // Convert @llvm.global.annotations to !annotation metadata. MPM.addPass(Annotation2MetadataPass()); @@ -1539,7 +1538,7 @@ ModulePassManager PassBuilder::buildThinLTODefaultPipeline( OptimizationLevel Level, const ModuleSummaryIndex *ImportSummary) { - ModulePassManager MPM(DebugLogging); + ModulePassManager MPM; // Convert @llvm.global.annotations to !annotation metadata. MPM.addPass(Annotation2MetadataPass()); @@ -1604,7 +1603,7 @@ ModulePassManager PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level, ModuleSummaryIndex *ExportSummary) { - ModulePassManager MPM(DebugLogging); + ModulePassManager MPM; // Convert @llvm.global.annotations to !annotation metadata. MPM.addPass(Annotation2MetadataPass()); @@ -1646,7 +1645,7 @@ MPM.addPass(InferFunctionAttrsPass()); if (Level.getSpeedupLevel() > 1) { - FunctionPassManager EarlyFPM(DebugLogging); + FunctionPassManager EarlyFPM; EarlyFPM.addPass(CallSiteSplittingPass()); MPM.addPass(createModuleToFunctionPassAdaptor(std::move(EarlyFPM))); @@ -1715,7 +1714,7 @@ // simplification opportunities, and both can propagate functions through // function pointers. When this happens, we often have to resolve varargs // calls, etc, so let instcombine do this. - FunctionPassManager PeepholeFPM(DebugLogging); + FunctionPassManager PeepholeFPM; if (Level == OptimizationLevel::O3) PeepholeFPM.addPass(AggressiveInstCombinePass()); PeepholeFPM.addPass(InstCombinePass()); @@ -1728,8 +1727,7 @@ // valuable as the inliner doesn't currently care whether it is inlining an // invoke or a call. // Run the inliner now. - MPM.addPass(ModuleInlinerWrapperPass(getInlineParamsFromOptLevel(Level), - DebugLogging)); + MPM.addPass(ModuleInlinerWrapperPass(getInlineParamsFromOptLevel(Level))); // Optimize globals again after we ran the inliner. MPM.addPass(GlobalOptPass()); @@ -1738,7 +1736,7 @@ // FIXME: Add ArgumentPromotion pass after once it's ported. MPM.addPass(GlobalDCEPass()); - FunctionPassManager FPM(DebugLogging); + FunctionPassManager FPM; // The IPO Passes may leave cruft around. Clean up after them. FPM.addPass(InstCombinePass()); invokePeepholeEPCallbacks(FPM, Level); @@ -1796,7 +1794,7 @@ if (EnableConstraintElimination) MainFPM.addPass(ConstraintEliminationPass()); - LoopPassManager LPM(DebugLogging); + LoopPassManager LPM; LPM.addPass(IndVarSimplifyPass()); LPM.addPass(LoopDeletionPass()); // FIXME: Add loop interchange. @@ -1808,8 +1806,7 @@ // The loop passes in LPM (LoopFullUnrollPass) do not preserve MemorySSA. // *All* loop passes must preserve it, in order to be able to use it. MainFPM.addPass(createFunctionToLoopPassAdaptor( - std::move(LPM), /*UseMemorySSA=*/false, /*UseBlockFrequencyInfo=*/true, - DebugLogging)); + std::move(LPM), /*UseMemorySSA=*/false, /*UseBlockFrequencyInfo=*/true)); MainFPM.addPass(LoopDistributePass()); MainFPM.addPass(LoopVectorizePass( @@ -1892,7 +1889,7 @@ assert(Level == OptimizationLevel::O0 && "buildO0DefaultPipeline should only be used with O0"); - ModulePassManager MPM(DebugLogging); + ModulePassManager MPM; if (PGOOpt && (PGOOpt->Action == PGOOptions::IRInstr || PGOOpt->Action == PGOOptions::IRUse)) @@ -1923,14 +1920,14 @@ createModuleToFunctionPassAdaptor(LowerMatrixIntrinsicsPass(true))); if (!CGSCCOptimizerLateEPCallbacks.empty()) { - CGSCCPassManager CGPM(DebugLogging); + CGSCCPassManager CGPM; for (auto &C : CGSCCOptimizerLateEPCallbacks) C(CGPM, Level); if (!CGPM.isEmpty()) MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); } if (!LateLoopOptimizationsEPCallbacks.empty()) { - LoopPassManager LPM(DebugLogging); + LoopPassManager LPM; for (auto &C : LateLoopOptimizationsEPCallbacks) C(LPM, Level); if (!LPM.isEmpty()) { @@ -1939,7 +1936,7 @@ } } if (!LoopOptimizerEndEPCallbacks.empty()) { - LoopPassManager LPM(DebugLogging); + LoopPassManager LPM; for (auto &C : LoopOptimizerEndEPCallbacks) C(LPM, Level); if (!LPM.isEmpty()) { @@ -1948,14 +1945,14 @@ } } if (!ScalarOptimizerLateEPCallbacks.empty()) { - FunctionPassManager FPM(DebugLogging); + FunctionPassManager FPM; for (auto &C : ScalarOptimizerLateEPCallbacks) C(FPM, Level); if (!FPM.isEmpty()) MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); } if (!VectorizerStartEPCallbacks.empty()) { - FunctionPassManager FPM(DebugLogging); + FunctionPassManager FPM; for (auto &C : VectorizerStartEPCallbacks) C(FPM, Level); if (!FPM.isEmpty()) @@ -1965,7 +1962,7 @@ if (PTO.Coroutines) { MPM.addPass(createModuleToFunctionPassAdaptor(CoroEarlyPass())); - CGSCCPassManager CGPM(DebugLogging); + CGSCCPassManager CGPM; CGPM.addPass(CoroSplitPass()); CGPM.addPass(createCGSCCToFunctionPassAdaptor(CoroElidePass())); MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); @@ -2488,28 +2485,28 @@ // First handle complex passes like the pass managers which carry pipelines. if (!InnerPipeline.empty()) { if (Name == "module") { - ModulePassManager NestedMPM(DebugLogging); + ModulePassManager NestedMPM; if (auto Err = parseModulePassPipeline(NestedMPM, InnerPipeline)) return Err; MPM.addPass(std::move(NestedMPM)); return Error::success(); } if (Name == "cgscc") { - CGSCCPassManager CGPM(DebugLogging); + CGSCCPassManager CGPM; if (auto Err = parseCGSCCPassPipeline(CGPM, InnerPipeline)) return Err; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); return Error::success(); } if (Name == "function") { - FunctionPassManager FPM(DebugLogging); + FunctionPassManager FPM; if (auto Err = parseFunctionPassPipeline(FPM, InnerPipeline)) return Err; MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); return Error::success(); } if (auto Count = parseRepeatPassName(Name)) { - ModulePassManager NestedMPM(DebugLogging); + ModulePassManager NestedMPM; if (auto Err = parseModulePassPipeline(NestedMPM, InnerPipeline)) return Err; MPM.addPass(createRepeatedPass(*Count, std::move(NestedMPM))); @@ -2612,9 +2609,8 @@ } #define LOOP_PASS(NAME, CREATE_PASS) \ if (Name == NAME) { \ - MPM.addPass( \ - createModuleToFunctionPassAdaptor(createFunctionToLoopPassAdaptor( \ - CREATE_PASS, false, false, DebugLogging))); \ + MPM.addPass(createModuleToFunctionPassAdaptor( \ + createFunctionToLoopPassAdaptor(CREATE_PASS, false, false))); \ return Error::success(); \ } #define LOOP_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER) \ @@ -2624,7 +2620,7 @@ return Params.takeError(); \ MPM.addPass( \ createModuleToFunctionPassAdaptor(createFunctionToLoopPassAdaptor( \ - CREATE_PASS(Params.get()), false, false, DebugLogging))); \ + CREATE_PASS(Params.get()), false, false))); \ return Error::success(); \ } #include "PassRegistry.def" @@ -2645,7 +2641,7 @@ // First handle complex passes like the pass managers which carry pipelines. if (!InnerPipeline.empty()) { if (Name == "cgscc") { - CGSCCPassManager NestedCGPM(DebugLogging); + CGSCCPassManager NestedCGPM; if (auto Err = parseCGSCCPassPipeline(NestedCGPM, InnerPipeline)) return Err; // Add the nested pass manager with the appropriate adaptor. @@ -2653,7 +2649,7 @@ return Error::success(); } if (Name == "function") { - FunctionPassManager FPM(DebugLogging); + FunctionPassManager FPM; if (auto Err = parseFunctionPassPipeline(FPM, InnerPipeline)) return Err; // Add the nested pass manager with the appropriate adaptor. @@ -2661,14 +2657,14 @@ return Error::success(); } if (auto Count = parseRepeatPassName(Name)) { - CGSCCPassManager NestedCGPM(DebugLogging); + CGSCCPassManager NestedCGPM; if (auto Err = parseCGSCCPassPipeline(NestedCGPM, InnerPipeline)) return Err; CGPM.addPass(createRepeatedPass(*Count, std::move(NestedCGPM))); return Error::success(); } if (auto MaxRepetitions = parseDevirtPassName(Name)) { - CGSCCPassManager NestedCGPM(DebugLogging); + CGSCCPassManager NestedCGPM; if (auto Err = parseCGSCCPassPipeline(NestedCGPM, InnerPipeline)) return Err; CGPM.addPass( @@ -2720,9 +2716,8 @@ } #define LOOP_PASS(NAME, CREATE_PASS) \ if (Name == NAME) { \ - CGPM.addPass( \ - createCGSCCToFunctionPassAdaptor(createFunctionToLoopPassAdaptor( \ - CREATE_PASS, false, false, DebugLogging))); \ + CGPM.addPass(createCGSCCToFunctionPassAdaptor( \ + createFunctionToLoopPassAdaptor(CREATE_PASS, false, false))); \ return Error::success(); \ } #define LOOP_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER) \ @@ -2732,7 +2727,7 @@ return Params.takeError(); \ CGPM.addPass( \ createCGSCCToFunctionPassAdaptor(createFunctionToLoopPassAdaptor( \ - CREATE_PASS(Params.get()), false, false, DebugLogging))); \ + CREATE_PASS(Params.get()), false, false))); \ return Error::success(); \ } #include "PassRegistry.def" @@ -2753,7 +2748,7 @@ // First handle complex passes like the pass managers which carry pipelines. if (!InnerPipeline.empty()) { if (Name == "function") { - FunctionPassManager NestedFPM(DebugLogging); + FunctionPassManager NestedFPM; if (auto Err = parseFunctionPassPipeline(NestedFPM, InnerPipeline)) return Err; // Add the nested pass manager with the appropriate adaptor. @@ -2761,7 +2756,7 @@ return Error::success(); } if (Name == "loop" || Name == "loop-mssa") { - LoopPassManager LPM(DebugLogging); + LoopPassManager LPM; if (auto Err = parseLoopPassPipeline(LPM, InnerPipeline)) return Err; // Add the nested pass manager with the appropriate adaptor. @@ -2769,11 +2764,11 @@ bool UseBFI = llvm::any_of( InnerPipeline, [](auto Pipeline) { return Pipeline.Name == "licm"; }); FPM.addPass(createFunctionToLoopPassAdaptor(std::move(LPM), UseMemorySSA, - UseBFI, DebugLogging)); + UseBFI)); return Error::success(); } if (auto Count = parseRepeatPassName(Name)) { - FunctionPassManager NestedFPM(DebugLogging); + FunctionPassManager NestedFPM; if (auto Err = parseFunctionPassPipeline(NestedFPM, InnerPipeline)) return Err; FPM.addPass(createRepeatedPass(*Count, std::move(NestedFPM))); @@ -2822,8 +2817,7 @@ // The risk is that it may become obsolete if we're not careful. #define LOOP_PASS(NAME, CREATE_PASS) \ if (Name == NAME) { \ - FPM.addPass(createFunctionToLoopPassAdaptor(CREATE_PASS, false, false, \ - DebugLogging)); \ + FPM.addPass(createFunctionToLoopPassAdaptor(CREATE_PASS, false, false)); \ return Error::success(); \ } #define LOOP_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER) \ @@ -2832,7 +2826,7 @@ if (!Params) \ return Params.takeError(); \ FPM.addPass(createFunctionToLoopPassAdaptor(CREATE_PASS(Params.get()), \ - false, false, DebugLogging)); \ + false, false)); \ return Error::success(); \ } #include "PassRegistry.def" @@ -2853,7 +2847,7 @@ // First handle complex passes like the pass managers which carry pipelines. if (!InnerPipeline.empty()) { if (Name == "loop") { - LoopPassManager NestedLPM(DebugLogging); + LoopPassManager NestedLPM; if (auto Err = parseLoopPassPipeline(NestedLPM, InnerPipeline)) return Err; // Add the nested pass manager with the appropriate adaptor. @@ -2861,7 +2855,7 @@ return Error::success(); } if (auto Count = parseRepeatPassName(Name)) { - LoopPassManager NestedLPM(DebugLogging); + LoopPassManager NestedLPM; if (auto Err = parseLoopPassPipeline(NestedLPM, InnerPipeline)) return Err; LPM.addPass(createRepeatedPass(*Count, std::move(NestedLPM))); @@ -3009,7 +3003,7 @@ Pipeline = {{"function", {{"loop", std::move(*Pipeline)}}}}; } else { for (auto &C : TopLevelPipelineParsingCallbacks) - if (C(MPM, *Pipeline, DebugLogging)) + if (C(MPM, *Pipeline)) return Error::success(); // Unknown pass or pipeline name! @@ -3190,7 +3184,7 @@ } void PassBuilder::registerParseTopLevelPipelineCallback( - const std::function, - bool DebugLogging)> &C) { + const std::function)> + &C) { TopLevelPipelineParsingCallbacks.push_back(C); } diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def --- a/llvm/lib/Passes/PassRegistry.def +++ b/llvm/lib/Passes/PassRegistry.def @@ -65,7 +65,6 @@ MODULE_PASS("inliner-wrapper", ModuleInlinerWrapperPass()) MODULE_PASS("inliner-wrapper-no-mandatory-first", ModuleInlinerWrapperPass( getInlineParams(), - DebugLogging, false)) MODULE_PASS("insert-gcov-profiling", GCOVProfilerPass()) MODULE_PASS("instrorderfile", InstrOrderFilePass()) diff --git a/llvm/lib/Passes/StandardInstrumentations.cpp b/llvm/lib/Passes/StandardInstrumentations.cpp --- a/llvm/lib/Passes/StandardInstrumentations.cpp +++ b/llvm/lib/Passes/StandardInstrumentations.cpp @@ -876,9 +876,11 @@ if (!DebugLogging) return; - std::vector SpecialPasses = {"PassManager"}; - if (!DebugPMVerbose) + std::vector SpecialPasses; + if (!DebugPMVerbose) { + SpecialPasses.emplace_back("PassManager"); SpecialPasses.emplace_back("PassAdaptor"); + } PIC.registerBeforeSkippedPassCallback( [SpecialPasses](StringRef PassID, Any IR) { diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h --- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h @@ -52,8 +52,7 @@ void adjustPassManager(PassManagerBuilder &) override; - void registerPassBuilderCallbacks(PassBuilder &PB, - bool DebugPassManager) override; + void registerPassBuilderCallbacks(PassBuilder &PB) override; void registerDefaultAliasAnalyses(AAManager &) override; /// Get the integer value of a null pointer in the given address space. diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp --- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp @@ -485,8 +485,7 @@ AAM.registerFunctionAnalysis(); } -void AMDGPUTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB, - bool DebugPassManager) { +void AMDGPUTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) { PB.registerPipelineParsingCallback( [this](StringRef PassName, ModulePassManager &PM, ArrayRef) { @@ -554,16 +553,16 @@ return false; }); - PB.registerPipelineStartEPCallback([this, DebugPassManager]( - ModulePassManager &PM, - PassBuilder::OptimizationLevel Level) { - FunctionPassManager FPM(DebugPassManager); - FPM.addPass(AMDGPUPropagateAttributesEarlyPass(*this)); - FPM.addPass(AMDGPUUseNativeCallsPass()); - if (EnableLibCallSimplify && Level != PassBuilder::OptimizationLevel::O0) - FPM.addPass(AMDGPUSimplifyLibCallsPass(*this)); - PM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); - }); + PB.registerPipelineStartEPCallback( + [this](ModulePassManager &PM, PassBuilder::OptimizationLevel Level) { + FunctionPassManager FPM; + FPM.addPass(AMDGPUPropagateAttributesEarlyPass(*this)); + FPM.addPass(AMDGPUUseNativeCallsPass()); + if (EnableLibCallSimplify && + Level != PassBuilder::OptimizationLevel::O0) + FPM.addPass(AMDGPUSimplifyLibCallsPass(*this)); + PM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); + }); PB.registerPipelineEarlySimplificationEPCallback( [this](ModulePassManager &PM, PassBuilder::OptimizationLevel Level) { @@ -588,12 +587,11 @@ }); PB.registerCGSCCOptimizerLateEPCallback( - [this, DebugPassManager](CGSCCPassManager &PM, - PassBuilder::OptimizationLevel Level) { + [this](CGSCCPassManager &PM, PassBuilder::OptimizationLevel Level) { if (Level == PassBuilder::OptimizationLevel::O0) return; - FunctionPassManager FPM(DebugPassManager); + FunctionPassManager FPM; // Add infer address spaces pass to the opt pipeline after inlining // but before SROA to increase SROA opportunities. diff --git a/llvm/lib/Target/BPF/BPFTargetMachine.h b/llvm/lib/Target/BPF/BPFTargetMachine.h --- a/llvm/lib/Target/BPF/BPFTargetMachine.h +++ b/llvm/lib/Target/BPF/BPFTargetMachine.h @@ -41,8 +41,7 @@ } void adjustPassManager(PassManagerBuilder &) override; - void registerPassBuilderCallbacks(PassBuilder &PB, - bool DebugPassManager) override; + void registerPassBuilderCallbacks(PassBuilder &PB) override; }; } diff --git a/llvm/lib/Target/BPF/BPFTargetMachine.cpp b/llvm/lib/Target/BPF/BPFTargetMachine.cpp --- a/llvm/lib/Target/BPF/BPFTargetMachine.cpp +++ b/llvm/lib/Target/BPF/BPFTargetMachine.cpp @@ -122,11 +122,10 @@ }); } -void BPFTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB, - bool DebugPassManager) { +void BPFTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) { PB.registerPipelineStartEPCallback( [=](ModulePassManager &MPM, PassBuilder::OptimizationLevel) { - FunctionPassManager FPM(DebugPassManager); + FunctionPassManager FPM; FPM.addPass(BPFAbstractMemberAccessPass(this)); FPM.addPass(BPFPreserveDITypePass()); MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); diff --git a/llvm/lib/Target/Hexagon/HexagonTargetMachine.h b/llvm/lib/Target/Hexagon/HexagonTargetMachine.h --- a/llvm/lib/Target/Hexagon/HexagonTargetMachine.h +++ b/llvm/lib/Target/Hexagon/HexagonTargetMachine.h @@ -37,8 +37,7 @@ static unsigned getModuleMatchQuality(const Module &M); void adjustPassManager(PassManagerBuilder &PMB) override; - void registerPassBuilderCallbacks(PassBuilder &PB, - bool DebugPassManager) override; + void registerPassBuilderCallbacks(PassBuilder &PB) override; TargetPassConfig *createPassConfig(PassManagerBase &PM) override; TargetTransformInfo getTargetTransformInfo(const Function &F) override; diff --git a/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp b/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp --- a/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp +++ b/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp @@ -278,8 +278,7 @@ }); } -void HexagonTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB, - bool DebugPassManager) { +void HexagonTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) { PB.registerLateLoopOptimizationsEPCallback( [=](LoopPassManager &LPM, PassBuilder::OptimizationLevel Level) { LPM.addPass(HexagonLoopIdiomRecognitionPass()); diff --git a/llvm/lib/Target/NVPTX/NVPTXTargetMachine.h b/llvm/lib/Target/NVPTX/NVPTXTargetMachine.h --- a/llvm/lib/Target/NVPTX/NVPTXTargetMachine.h +++ b/llvm/lib/Target/NVPTX/NVPTXTargetMachine.h @@ -62,8 +62,7 @@ } void adjustPassManager(PassManagerBuilder &) override; - void registerPassBuilderCallbacks(PassBuilder &PB, - bool DebugPassManager) override; + void registerPassBuilderCallbacks(PassBuilder &PB) override; TargetTransformInfo getTargetTransformInfo(const Function &F) override; diff --git a/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp b/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp --- a/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp @@ -209,8 +209,7 @@ }); } -void NVPTXTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB, - bool DebugPassManager) { +void NVPTXTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) { PB.registerPipelineParsingCallback( [](StringRef PassName, FunctionPassManager &PM, ArrayRef) { @@ -226,9 +225,8 @@ }); PB.registerPipelineStartEPCallback( - [this, DebugPassManager](ModulePassManager &PM, - PassBuilder::OptimizationLevel Level) { - FunctionPassManager FPM(DebugPassManager); + [this](ModulePassManager &PM, PassBuilder::OptimizationLevel Level) { + FunctionPassManager FPM; FPM.addPass(NVVMReflectPass(Subtarget.getSmVersion())); // FIXME: NVVMIntrRangePass is causing numerical discrepancies, // investigate and re-enable. diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp --- a/llvm/lib/Transforms/IPO/Inliner.cpp +++ b/llvm/lib/Transforms/IPO/Inliner.cpp @@ -998,12 +998,11 @@ } ModuleInlinerWrapperPass::ModuleInlinerWrapperPass(InlineParams Params, - bool Debugging, bool MandatoryFirst, InliningAdvisorMode Mode, unsigned MaxDevirtIterations) : Params(Params), Mode(Mode), MaxDevirtIterations(MaxDevirtIterations), - PM(Debugging), MPM(Debugging) { + PM(), MPM() { // Run the inliner first. The theory is that we are walking bottom-up and so // the callees have already been fully optimized, and we want to inline them // into the callers so that our optimizations can reflect that. diff --git a/llvm/lib/Transforms/Scalar/LoopPassManager.cpp b/llvm/lib/Transforms/Scalar/LoopPassManager.cpp --- a/llvm/lib/Transforms/Scalar/LoopPassManager.cpp +++ b/llvm/lib/Transforms/Scalar/LoopPassManager.cpp @@ -27,10 +27,6 @@ PassManager::run(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR, LPMUpdater &U) { - - if (DebugLogging) - dbgs() << "Starting Loop pass manager run.\n"; - // Runs loop-nest passes only when the current loop is a top-level one. PreservedAnalyses PA = (L.isOutermost() && !LoopNestPasses.empty()) ? runWithLoopNestPasses(L, AM, AR, U) @@ -45,9 +41,6 @@ // be preserved, but unrolling should invalidate the parent loop's analyses. PA.preserveSet>(); - if (DebugLogging) - dbgs() << "Finished Loop pass manager run.\n"; - return PA; } diff --git a/llvm/test/Other/loop-pm-invalidation.ll b/llvm/test/Other/loop-pm-invalidation.ll --- a/llvm/test/Other/loop-pm-invalidation.ll +++ b/llvm/test/Other/loop-pm-invalidation.ll @@ -18,106 +18,74 @@ ; RUN: | FileCheck %s --check-prefix=CHECK-SCEV-INV-AFTER-DELETE define void @no_loops() { -; CHECK-LOOP-INV: Starting {{.*}}Function pass manager run -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Function pass manager run -; CHECK-LOOP-INV-NEXT: Running pass: LoopSimplifyPass +; CHECK-LOOP-INV: Running pass: LoopSimplifyPass ; CHECK-LOOP-INV-NEXT: Running analysis: LoopAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: DominatorTreeAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: AssumptionAnalysis ; CHECK-LOOP-INV-NEXT: Running pass: LCSSAPass -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Function pass manager run ; CHECK-LOOP-INV-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}LoopAnalysis ; CHECK-LOOP-INV-NEXT: Invalidating analysis: LoopAnalysis -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Function pass manager run ; CHECK-LOOP-INV-NEXT: Running pass: LoopSimplifyPass ; CHECK-LOOP-INV-NEXT: Running analysis: LoopAnalysis ; CHECK-LOOP-INV-NEXT: Running pass: LCSSAPass -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Function pass manager run -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Function pass manager run. ; -; CHECK-SCEV-INV: Starting {{.*}}Function pass manager run -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Function pass manager run -; CHECK-SCEV-INV-NEXT: Running pass: LoopSimplifyPass +; CHECK-SCEV-INV: Running pass: LoopSimplifyPass ; CHECK-SCEV-INV-NEXT: Running analysis: LoopAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: DominatorTreeAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: AssumptionAnalysis ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Function pass manager run ; CHECK-SCEV-INV-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ScalarEvolutionAnalysis -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Function pass manager run ; CHECK-SCEV-INV-NEXT: Running pass: LoopSimplifyPass ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Function pass manager run -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Function pass manager run. entry: ret void } define void @one_loop(i1* %ptr) { -; CHECK-LOOP-INV: Starting {{.*}}Function pass manager run -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Function pass manager run -; CHECK-LOOP-INV-NEXT: Running pass: LoopSimplifyPass +; CHECK-LOOP-INV: Running pass: LoopSimplifyPass ; CHECK-LOOP-INV-NEXT: Running analysis: LoopAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: DominatorTreeAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: AssumptionAnalysis ; CHECK-LOOP-INV-NEXT: Running pass: LCSSAPass -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Function pass manager run ; CHECK-LOOP-INV-NEXT: Running analysis: AAManager ; CHECK-LOOP-INV-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: TargetIRAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-LOOP-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Loop pass manager run. ; CHECK-LOOP-INV-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}LoopAnalysis ; CHECK-LOOP-INV-NEXT: Clearing all analysis results for: ; CHECK-LOOP-INV-NEXT: Invalidating analysis: LoopAnalysis ; CHECK-LOOP-INV-NEXT: Invalidating analysis: ScalarEvolutionAnalysis ; CHECK-LOOP-INV-NEXT: Invalidating analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Function pass manager run ; CHECK-LOOP-INV-NEXT: Running pass: LoopSimplifyPass ; CHECK-LOOP-INV-NEXT: Running analysis: LoopAnalysis ; CHECK-LOOP-INV-NEXT: Running pass: LCSSAPass -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Function pass manager run ; CHECK-LOOP-INV-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-LOOP-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Loop pass manager run. -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Function pass manager run. ; -; CHECK-SCEV-INV: Starting {{.*}}Function pass manager run -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Function pass manager run ; CHECK-SCEV-INV-NEXT: Running pass: LoopSimplifyPass ; CHECK-SCEV-INV-NEXT: Running analysis: LoopAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: DominatorTreeAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: AssumptionAnalysis ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Function pass manager run ; CHECK-SCEV-INV-NEXT: Running analysis: AAManager ; CHECK-SCEV-INV-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: TargetIRAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-SCEV-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Loop pass manager run. ; CHECK-SCEV-INV-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ScalarEvolutionAnalysis ; CHECK-SCEV-INV-NEXT: Clearing all analysis results for: ; CHECK-SCEV-INV-NEXT: Invalidating analysis: ScalarEvolutionAnalysis ; CHECK-SCEV-INV-NEXT: Invalidating analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Function pass manager run ; CHECK-SCEV-INV-NEXT: Running pass: LoopSimplifyPass ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Function pass manager run ; CHECK-SCEV-INV-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-SCEV-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Loop pass manager run. -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Function pass manager run. entry: br label %l0.header @@ -131,83 +99,55 @@ } define void @nested_loops(i1* %ptr) { -; CHECK-LOOP-INV: Starting {{.*}}Function pass manager run -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Function pass manager run -; CHECK-LOOP-INV-NEXT: Running pass: LoopSimplifyPass +; CHECK-LOOP-INV: Running pass: LoopSimplifyPass ; CHECK-LOOP-INV-NEXT: Running analysis: LoopAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: DominatorTreeAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: AssumptionAnalysis ; CHECK-LOOP-INV-NEXT: Running pass: LCSSAPass -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Function pass manager run ; CHECK-LOOP-INV-NEXT: Running analysis: AAManager ; CHECK-LOOP-INV-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: TargetIRAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-LOOP-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Loop pass manager run. -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-LOOP-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-LOOP-INV: Finished {{.*}}Loop pass manager run. ; CHECK-LOOP-INV-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}LoopAnalysis ; CHECK-LOOP-INV-NEXT: Clearing all analysis results for: ; CHECK-LOOP-INV-NEXT: Clearing all analysis results for: ; CHECK-LOOP-INV-NEXT: Invalidating analysis: LoopAnalysis ; CHECK-LOOP-INV-NEXT: Invalidating analysis: ScalarEvolutionAnalysis ; CHECK-LOOP-INV-NEXT: Invalidating analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Function pass manager run ; CHECK-LOOP-INV-NEXT: Running pass: LoopSimplifyPass ; CHECK-LOOP-INV-NEXT: Running analysis: LoopAnalysis ; CHECK-LOOP-INV-NEXT: Running pass: LCSSAPass -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Function pass manager run ; CHECK-LOOP-INV-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-LOOP-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Loop pass manager run. -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-LOOP-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-LOOP-INV: Finished {{.*}}Loop pass manager run. -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Function pass manager run. ; -; CHECK-SCEV-INV: Starting {{.*}}Function pass manager run -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Function pass manager run -; CHECK-SCEV-INV-NEXT: Running pass: LoopSimplifyPass +; CHECK-SCEV-INV: Running pass: LoopSimplifyPass ; CHECK-SCEV-INV-NEXT: Running analysis: LoopAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: DominatorTreeAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: AssumptionAnalysis ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Function pass manager run ; CHECK-SCEV-INV-NEXT: Running analysis: AAManager ; CHECK-SCEV-INV-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: TargetIRAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-SCEV-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Loop pass manager run. -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-SCEV-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-SCEV-INV: Finished {{.*}}Loop pass manager run. ; CHECK-SCEV-INV-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ScalarEvolutionAnalysis ; CHECK-SCEV-INV-NEXT: Clearing all analysis results for: ; CHECK-SCEV-INV-NEXT: Clearing all analysis results for: ; CHECK-SCEV-INV-NEXT: Invalidating analysis: ScalarEvolutionAnalysis ; CHECK-SCEV-INV-NEXT: Invalidating analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Function pass manager run ; CHECK-SCEV-INV-NEXT: Running pass: LoopSimplifyPass ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Function pass manager run ; CHECK-SCEV-INV-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-SCEV-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Loop pass manager run. -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-SCEV-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-SCEV-INV: Finished {{.*}}Loop pass manager run. -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Function pass manager run. entry: br label %l.0.header @@ -228,94 +168,68 @@ } define void @dead_loop() { -; CHECK-LOOP-INV: Starting {{.*}}Function pass manager run -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Function pass manager run -; CHECK-LOOP-INV-NEXT: Running pass: LoopSimplifyPass +; CHECK-LOOP-INV: Running pass: LoopSimplifyPass ; CHECK-LOOP-INV-NEXT: Running analysis: LoopAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: DominatorTreeAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: AssumptionAnalysis ; CHECK-LOOP-INV-NEXT: Running pass: LCSSAPass -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Function pass manager run ; CHECK-LOOP-INV-NEXT: Running analysis: AAManager ; CHECK-LOOP-INV-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: TargetIRAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-LOOP-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Loop pass manager run. ; CHECK-LOOP-INV-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}LoopAnalysis ; CHECK-LOOP-INV-NEXT: Clearing all analysis results for: ; CHECK-LOOP-INV-NEXT: Invalidating analysis: LoopAnalysis ; CHECK-LOOP-INV-NEXT: Invalidating analysis: ScalarEvolutionAnalysis ; CHECK-LOOP-INV-NEXT: Invalidating analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Function pass manager run ; CHECK-LOOP-INV-NEXT: Running pass: LoopSimplifyPass ; CHECK-LOOP-INV-NEXT: Running analysis: LoopAnalysis ; CHECK-LOOP-INV-NEXT: Running pass: LCSSAPass -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Function pass manager run ; CHECK-LOOP-INV-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-LOOP-INV-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-LOOP-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-LOOP-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Loop pass manager run. -; CHECK-LOOP-INV-NEXT: Finished {{.*}}Function pass manager run. ; -; CHECK-SCEV-INV: Starting {{.*}}Function pass manager run -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Function pass manager run -; CHECK-SCEV-INV-NEXT: Running pass: LoopSimplifyPass +; CHECK-SCEV-INV: Running pass: LoopSimplifyPass ; CHECK-SCEV-INV-NEXT: Running analysis: LoopAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: DominatorTreeAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: AssumptionAnalysis ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Function pass manager run ; CHECK-SCEV-INV-NEXT: Running analysis: AAManager ; CHECK-SCEV-INV-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: TargetIRAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-SCEV-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Loop pass manager run. ; CHECK-SCEV-INV-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ScalarEvolutionAnalysis ; CHECK-SCEV-INV-NEXT: Clearing all analysis results for: ; CHECK-SCEV-INV-NEXT: Invalidating analysis: ScalarEvolutionAnalysis ; CHECK-SCEV-INV-NEXT: Invalidating analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Function pass manager run ; CHECK-SCEV-INV-NEXT: Running pass: LoopSimplifyPass ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Function pass manager run ; CHECK-SCEV-INV-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-SCEV-INV-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-SCEV-INV-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-SCEV-INV-NEXT: Running pass: NoOpLoopPass -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Loop pass manager run. -; CHECK-SCEV-INV-NEXT: Finished {{.*}}Function pass manager run. ; ; CHECK-SCEV-INV-AFTER-DELETE-LABEL: Running pass: LoopSimplifyPass on dead_loop ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Running analysis: LoopAnalysis ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Running analysis: DominatorTreeAnalysis ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Running analysis: AssumptionAnalysis ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Running pass: LCSSAPass -; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Finished {{.*}}Function pass manager run ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Running analysis: AAManager ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Running analysis: TargetIRAnalysis ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Starting {{.*}}Loop pass manager run. ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Running pass: NoOpLoopPass ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Running pass: LoopDeletionPass ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Clearing all analysis results for: -; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Finished {{.*}}Loop pass manager run. ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ScalarEvolutionAnalysis ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Invalidating analysis: ScalarEvolutionAnalysis ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Invalidating analysis: InnerAnalysisManagerProxy<{{.*}}Loop -; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Starting {{.*}}Function pass manager run ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Running pass: LoopSimplifyPass ; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Running pass: LCSSAPass -; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Finished {{.*}}Function pass manager run -; CHECK-SCEV-INV-AFTER-DELETE-NEXT: Finished {{.*}}Function pass manager run. entry: br label %l0.header diff --git a/llvm/test/Other/new-pass-manager.ll b/llvm/test/Other/new-pass-manager.ll --- a/llvm/test/Other/new-pass-manager.ll +++ b/llvm/test/Other/new-pass-manager.ll @@ -8,9 +8,7 @@ ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \ ; RUN: -passes=no-op-module %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PASS -; CHECK-MODULE-PASS: Starting llvm::Module pass manager run -; CHECK-MODULE-PASS-NEXT: Running pass: NoOpModulePass -; CHECK-MODULE-PASS-NEXT: Finished llvm::Module pass manager run +; CHECK-MODULE-PASS: Running pass: NoOpModulePass ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \ ; RUN: -passes=no-op-cgscc %s 2>&1 \ @@ -18,17 +16,13 @@ ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \ ; RUN: -passes='cgscc(no-op-cgscc)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-CGSCC-PASS -; CHECK-CGSCC-PASS: Starting llvm::Module pass manager run -; CHECK-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}},{{.*}}Module> +; CHECK-CGSCC-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}},{{.*}}Module> ; CHECK-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(FunctionAnalysisManager|AnalysisManager<.*Function.*>).*}},{{.*}}Module> ; CHECK-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis ; CHECK-CGSCC-PASS-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-CGSCC-PASS-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy ; CHECK-CGSCC-PASS-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}> -; CHECK-CGSCC-PASS-NEXT: Starting CGSCC pass manager run ; CHECK-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass -; CHECK-CGSCC-PASS-NEXT: Finished CGSCC pass manager run -; CHECK-CGSCC-PASS-NEXT: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \ ; RUN: -passes=no-op-function %s 2>&1 \ @@ -36,56 +30,40 @@ ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \ ; RUN: -passes='function(no-op-function)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS -; CHECK-FUNCTION-PASS: Starting llvm::Module pass manager run -; CHECK-FUNCTION-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}> +; CHECK-FUNCTION-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*}}> ; CHECK-FUNCTION-PASS-NEXT: Running analysis: PreservedCFGCheckerAnalysis on foo -; CHECK-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run ; CHECK-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass -; CHECK-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run -; CHECK-FUNCTION-PASS-NEXT: Finished llvm::Module pass manager run ; RUN: opt -disable-output -debug-pass-manager -passes=print %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PRINT -; CHECK-MODULE-PRINT: Starting llvm::Module pass manager run ; CHECK-MODULE-PRINT: Running pass: VerifierPass ; CHECK-MODULE-PRINT: Running pass: PrintModulePass ; CHECK-MODULE-PRINT: ModuleID ; CHECK-MODULE-PRINT: define void @foo(i1 %x, i8* %p1, i8* %p2) ; CHECK-MODULE-PRINT: Running pass: VerifierPass -; CHECK-MODULE-PRINT: Finished llvm::Module pass manager run ; RUN: opt -disable-output -debug-pass-manager -disable-verify -verify-cfg-preserved=1 -passes='print,verify' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-VERIFY -; CHECK-MODULE-VERIFY: Starting llvm::Module pass manager run ; CHECK-MODULE-VERIFY: Running pass: PrintModulePass ; CHECK-MODULE-VERIFY: ModuleID ; CHECK-MODULE-VERIFY: define void @foo(i1 %x, i8* %p1, i8* %p2) ; CHECK-MODULE-VERIFY: Running pass: VerifierPass -; CHECK-MODULE-VERIFY: Finished llvm::Module pass manager run ; RUN: opt -disable-output -debug-pass-manager -passes='function(print)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PRINT -; CHECK-FUNCTION-PRINT: Starting llvm::Module pass manager run ; CHECK-FUNCTION-PRINT: Running pass: VerifierPass ; CHECK-FUNCTION-PRINT: Running analysis: InnerAnalysisManagerProxy<{{.*}}> -; CHECK-FUNCTION-PRINT: Starting llvm::Function pass manager run ; CHECK-FUNCTION-PRINT: Running pass: PrintFunctionPass ; CHECK-FUNCTION-PRINT-NOT: ModuleID ; CHECK-FUNCTION-PRINT: define void @foo(i1 %x, i8* %p1, i8* %p2) -; CHECK-FUNCTION-PRINT: Finished llvm::Function pass manager run ; CHECK-FUNCTION-PRINT: Running pass: VerifierPass -; CHECK-FUNCTION-PRINT: Finished llvm::Module pass manager run ; RUN: opt -disable-output -debug-pass-manager -disable-verify -verify-cfg-preserved=1 -passes='function(print,verify)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-VERIFY -; CHECK-FUNCTION-VERIFY: Starting llvm::Module pass manager run -; CHECK-FUNCTION-VERIFY: Starting llvm::Function pass manager run ; CHECK-FUNCTION-VERIFY: Running pass: PrintFunctionPass ; CHECK-FUNCTION-VERIFY-NOT: ModuleID ; CHECK-FUNCTION-VERIFY: define void @foo(i1 %x, i8* %p1, i8* %p2) ; CHECK-FUNCTION-VERIFY: Running pass: VerifierPass -; CHECK-FUNCTION-VERIFY: Finished llvm::Function pass manager run -; CHECK-FUNCTION-VERIFY: Finished llvm::Module pass manager run ; RUN: opt -S -o - -passes='no-op-module,no-op-module' %s \ ; RUN: | FileCheck %s --check-prefix=CHECK-NOOP @@ -107,27 +85,20 @@ ; RUN: opt -disable-output -debug-pass-manager -disable-verify -verify-cfg-preserved=1 -passes='no-op-module,function(no-op-function)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-NO-VERIFY -; CHECK-NO-VERIFY: Starting llvm::Module pass manager run ; CHECK-NO-VERIFY-NOT: VerifierPass ; CHECK-NO-VERIFY: Running pass: NoOpModulePass ; CHECK-NO-VERIFY-NOT: VerifierPass -; CHECK-NO-VERIFY: Starting llvm::Function pass manager run ; CHECK-NO-VERIFY: Running pass: NoOpFunctionPass ; CHECK-NO-VERIFY-NOT: VerifierPass -; CHECK-NO-VERIFY: Finished llvm::Function pass manager run ; CHECK-NO-VERIFY-NOT: VerifierPass -; CHECK-NO-VERIFY: Finished llvm::Module pass manager run ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='require,cgscc(require,function(require))' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-ANALYSES -; CHECK-ANALYSES: Starting llvm::Module pass manager run ; CHECK-ANALYSES: Running pass: RequireAnalysisPass ; CHECK-ANALYSES: Running analysis: NoOpModuleAnalysis -; CHECK-ANALYSES: Starting CGSCC pass manager run ; CHECK-ANALYSES: Running pass: RequireAnalysisPass ; CHECK-ANALYSES: Running analysis: NoOpCGSCCAnalysis -; CHECK-ANALYSES: Starting llvm::Function pass manager run ; CHECK-ANALYSES: Running pass: RequireAnalysisPass ; CHECK-ANALYSES: Running analysis: NoOpFunctionAnalysis @@ -136,12 +107,11 @@ ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='require,cgscc(require,function(require))' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-NO-OP-INVALIDATION -; CHECK-NO-OP-INVALIDATION: Starting llvm::Module pass manager run +; CHECK-NO-OP-INVALIDATION-NOT: Invalidat ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='require,require,require' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS -; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Starting llvm::Module pass manager run ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS-NOT: Running analysis: NoOpModuleAnalysis @@ -149,7 +119,6 @@ ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='require,invalidate,require' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS -; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Starting llvm::Module pass manager run ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Invalidating analysis: NoOpModuleAnalysis @@ -158,7 +127,6 @@ ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='cgscc(require,require,require)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS -; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Starting llvm::Module pass manager run ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS-NOT: Running analysis: NoOpCGSCCAnalysis @@ -166,7 +134,6 @@ ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='cgscc(require,invalidate,require)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS -; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Starting llvm::Module pass manager run ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Invalidating analysis: NoOpCGSCCAnalysis @@ -175,7 +142,6 @@ ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='function(require,require,require)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS -; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Starting llvm::Module pass manager run ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS-NOT: Running analysis: NoOpFunctionAnalysis @@ -183,7 +149,6 @@ ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='function(require,invalidate,require)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS -; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Starting llvm::Module pass manager run ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Invalidating analysis: NoOpFunctionAnalysis @@ -192,51 +157,42 @@ ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \ ; RUN: -passes='require,module(require,function(require,invalidate,require),require),require' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL -; CHECK-INVALIDATE-ALL: Starting llvm::Module pass manager run ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL: Starting llvm::Function pass manager run ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis ; CHECK-INVALIDATE-ALL: Running pass: InvalidateAllAnalysesPass ; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpFunctionAnalysis ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis -; CHECK-INVALIDATE-ALL: Finished llvm::Function pass manager run ; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpModuleAnalysis ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis ; CHECK-INVALIDATE-ALL-NOT: Invalidating analysis: NoOpModuleAnalysis ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \ ; RUN: -passes='require,module(require,cgscc(require,function(require,invalidate,require),require),require),require' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL-CG -; CHECK-INVALIDATE-ALL-CG: Starting llvm::Module pass manager run ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL-CG: Starting CGSCC pass manager run ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis -; CHECK-INVALIDATE-ALL-CG: Starting llvm::Function pass manager run ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis ; CHECK-INVALIDATE-ALL-CG: Running pass: InvalidateAllAnalysesPass ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpFunctionAnalysis ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis -; CHECK-INVALIDATE-ALL-CG: Finished llvm::Function pass manager run ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpFunctionAnalysis ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpCGSCCAnalysis ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis -; CHECK-INVALIDATE-ALL-CG: Finished CGSCC pass manager run ; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpCGSCCAnalysis ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpModuleAnalysis ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass @@ -244,72 +200,58 @@ ; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpModuleAnalysis ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL-CG: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \ ; RUN: -passes='require,invalidate,require' \ ; RUN: | FileCheck %s --check-prefix=CHECK-TLI -; CHECK-TLI: Starting llvm::Module pass manager run ; CHECK-TLI: Running pass: RequireAnalysisPass ; CHECK-TLI: Running analysis: TargetLibraryAnalysis ; CHECK-TLI: Running pass: InvalidateAllAnalysesPass ; CHECK-TLI-NOT: Invalidating analysis: TargetLibraryAnalysis ; CHECK-TLI: Running pass: RequireAnalysisPass ; CHECK-TLI-NOT: Running analysis: TargetLibraryAnalysis -; CHECK-TLI: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \ ; RUN: -passes='require,invalidate,require' \ ; RUN: | FileCheck %s --check-prefix=CHECK-TIRA -; CHECK-TIRA: Starting llvm::Module pass manager run ; CHECK-TIRA: Running pass: RequireAnalysisPass ; CHECK-TIRA: Running analysis: TargetIRAnalysis ; CHECK-TIRA: Running pass: InvalidateAllAnalysesPass ; CHECK-TIRA-NOT: Invalidating analysis: TargetIRAnalysis ; CHECK-TIRA: Running pass: RequireAnalysisPass ; CHECK-TIRA-NOT: Running analysis: TargetIRAnalysis -; CHECK-TIRA: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \ ; RUN: -passes='require' \ ; RUN: | FileCheck %s --check-prefix=CHECK-DT -; CHECK-DT: Starting llvm::Module pass manager run ; CHECK-DT: Running pass: RequireAnalysisPass ; CHECK-DT: Running analysis: DominatorTreeAnalysis -; CHECK-DT: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \ ; RUN: -passes='require' \ ; RUN: | FileCheck %s --check-prefix=CHECK-BASIC-AA -; CHECK-BASIC-AA: Starting llvm::Module pass manager run ; CHECK-BASIC-AA: Running pass: RequireAnalysisPass ; CHECK-BASIC-AA: Running analysis: BasicAA -; CHECK-BASIC-AA: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \ ; RUN: -passes='require' -aa-pipeline='basic-aa' \ ; RUN: | FileCheck %s --check-prefix=CHECK-AA -; CHECK-AA: Starting llvm::Module pass manager run ; CHECK-AA: Running pass: RequireAnalysisPass ; CHECK-AA: Running analysis: AAManager ; CHECK-AA: Running analysis: BasicAA -; CHECK-AA: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \ ; RUN: -passes='require' -aa-pipeline='default' \ ; RUN: | FileCheck %s --check-prefix=CHECK-AA-DEFAULT -; CHECK-AA-DEFAULT: Starting llvm::Module pass manager run ; CHECK-AA-DEFAULT: Running pass: RequireAnalysisPass ; CHECK-AA-DEFAULT: Running analysis: AAManager ; CHECK-AA-DEFAULT: Running analysis: BasicAA ; CHECK-AA-DEFAULT: Running analysis: ScopedNoAliasAA ; CHECK-AA-DEFAULT: Running analysis: TypeBasedAA -; CHECK-AA-DEFAULT: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \ ; RUN: -passes='require,invalidate,aa-eval' -aa-pipeline='basic-aa' \ ; RUN: | FileCheck %s --check-prefix=CHECK-AA-FUNCTION-INVALIDATE -; CHECK-AA-FUNCTION-INVALIDATE: Starting llvm::Function pass manager run ; CHECK-AA-FUNCTION-INVALIDATE: Running pass: RequireAnalysisPass ; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: AAManager ; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: BasicAA @@ -320,126 +262,80 @@ ; CHECK-AA-FUNCTION-INVALIDATE: Running pass: AAEvaluator ; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: AAManager ; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: BasicAA -; CHECK-AA-FUNCTION-INVALIDATE: Finished llvm::Function pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \ ; RUN: -passes='require,function(require),invalidate,require,function(aa-eval)' -aa-pipeline='globals-aa' \ ; RUN: | FileCheck %s --check-prefix=CHECK-AA-MODULE-INVALIDATE -; CHECK-AA-MODULE-INVALIDATE: Starting llvm::Module pass manager run ; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass ; CHECK-AA-MODULE-INVALIDATE: Running analysis: GlobalsAA -; CHECK-AA-MODULE-INVALIDATE: Starting llvm::Function pass manager run ; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass ; CHECK-AA-MODULE-INVALIDATE: Running analysis: AAManager -; CHECK-AA-MODULE-INVALIDATE: Finished llvm::Function pass manager run ; CHECK-AA-MODULE-INVALIDATE: Running pass: InvalidateAnalysisPass ; CHECK-AA-MODULE-INVALIDATE: Invalidating analysis: GlobalsAA ; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass ; CHECK-AA-MODULE-INVALIDATE: Running analysis: GlobalsAA -; CHECK-AA-MODULE-INVALIDATE: Starting llvm::Function pass manager run ; CHECK-AA-MODULE-INVALIDATE: Running pass: AAEvaluator -; CHECK-AA-MODULE-INVALIDATE: Finished llvm::Function pass manager run -; CHECK-AA-MODULE-INVALIDATE: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \ ; RUN: -passes='require' \ ; RUN: | FileCheck %s --check-prefix=CHECK-MEMDEP -; CHECK-MEMDEP: Starting llvm::Module pass manager run ; CHECK-MEMDEP: Running pass: RequireAnalysisPass ; CHECK-MEMDEP: Running analysis: MemoryDependenceAnalysis -; CHECK-MEMDEP: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \ ; RUN: -passes='require' \ ; RUN: | FileCheck %s --check-prefix=CHECK-CALLGRAPH -; CHECK-CALLGRAPH: Starting llvm::Module pass manager run ; CHECK-CALLGRAPH: Running pass: RequireAnalysisPass ; CHECK-CALLGRAPH: Running analysis: CallGraphAnalysis -; CHECK-CALLGRAPH: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \ ; RUN: -passes='default' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O0 --check-prefix=%llvmcheckext -; CHECK-O0: Starting llvm::Module pass manager run -; CHECK-O0-NEXT: Running pass: AlwaysInlinerPass +; CHECK-O0: Running pass: AlwaysInlinerPass ; CHECK-O0-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}> ; CHECK-O0-NEXT: Running analysis: ProfileSummaryAnalysis -; CHECK-EXT-NEXT: Starting llvm::Function pass manager run. ; CHECK-EXT-NEXT: Running pass: {{.*}}Bye -; CHECK-EXT-NEXT: Finished llvm::Function pass manager run. ; We don't have checks for CHECK-NOEXT here, but this simplifies the test, while ; avoiding FileCheck complaining about the unused prefix. ; CHECK-NOEXT: {{.*}} -; CHECK-O0-NEXT: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \ ; RUN: -passes='repeat<3>(no-op-module)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-MODULE-PASS -; CHECK-REPEAT-MODULE-PASS: Starting llvm::Module pass manager run -; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: RepeatedPass -; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run +; CHECK-REPEAT-MODULE-PASS: Running pass: RepeatedPass ; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass -; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run -; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run ; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass -; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run -; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run ; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass -; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run -; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \ ; RUN: -passes='cgscc(repeat<3>(no-op-cgscc))' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-CGSCC-PASS -; CHECK-REPEAT-CGSCC-PASS: Starting llvm::Module pass manager run -; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}},{{.*}}Module> +; CHECK-REPEAT-CGSCC-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}},{{.*}}Module> ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(FunctionAnalysisManager|AnalysisManager<.*Function.*>).*}},{{.*}}Module> ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}> -; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: RepeatedPass -; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass -; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run -; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass -; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run -; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass -; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run -; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run -; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \ ; RUN: -passes='function(repeat<3>(no-op-function))' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-FUNCTION-PASS -; CHECK-REPEAT-FUNCTION-PASS: Starting llvm::Module pass manager run -; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}> +; CHECK-REPEAT-FUNCTION-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*}}> ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running analysis: PreservedCFGCheckerAnalysis on foo -; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: RepeatedPass -; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass -; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run -; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass -; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run -; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass -; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run -; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run -; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Module pass manager run ; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \ ; RUN: -passes='loop(repeat<3>(no-op-loop))' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-LOOP-PASS -; CHECK-REPEAT-LOOP-PASS: Starting llvm::Module pass manager run -; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}> +; CHECK-REPEAT-LOOP-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*}}> ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: PreservedCFGCheckerAnalysis on foo -; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Function pass manager run -; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Function pass manager run ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: LoopSimplify ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: LoopAnalysis ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: DominatorTreeAnalysis @@ -447,7 +343,6 @@ ; CHECK-REPEAT-LOOP-PASS-NEXT: Invalidating analysis: PreservedCFGCheckerAnalysis on foo ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: LCSSAPass ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: PreservedCFGCheckerAnalysis on foo -; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Function pass manager run ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: AAManager ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: BasicAA @@ -457,20 +352,10 @@ ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TargetIRAnalysis ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}> -; CHECK-REPEAT-LOOP-PASS-NEXT: Starting Loop pass manager run ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: RepeatedPass -; CHECK-REPEAT-LOOP-PASS-NEXT: Starting Loop pass manager run ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass -; CHECK-REPEAT-LOOP-PASS-NEXT: Finished Loop pass manager run -; CHECK-REPEAT-LOOP-PASS-NEXT: Starting Loop pass manager run ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass -; CHECK-REPEAT-LOOP-PASS-NEXT: Finished Loop pass manager run -; CHECK-REPEAT-LOOP-PASS-NEXT: Starting Loop pass manager run ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass -; CHECK-REPEAT-LOOP-PASS-NEXT: Finished Loop pass manager run -; CHECK-REPEAT-LOOP-PASS-NEXT: Finished Loop pass manager run -; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Function pass manager run -; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Module pass manager run define void @foo(i1 %x, i8* %p1, i8* %p2) { entry: diff --git a/llvm/test/Other/new-pm-O0-defaults.ll b/llvm/test/Other/new-pm-O0-defaults.ll --- a/llvm/test/Other/new-pm-O0-defaults.ll +++ b/llvm/test/Other/new-pm-O0-defaults.ll @@ -26,19 +26,18 @@ ; RUN: -passes='lto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK,CHECK-LTO -; CHECK: Starting llvm::Module pass manager run. -; CHECK-DEFAULT-NEXT: Running pass: AlwaysInlinerPass +; CHECK-DEFAULT: Running pass: AlwaysInlinerPass ; CHECK-DEFAULT-NEXT: Running analysis: InnerAnalysisManagerProxy ; CHECK-DEFAULT-NEXT: Running analysis: ProfileSummaryAnalysis -; CHECK-MATRIX-NEXT: Running pass: LowerMatrixIntrinsicsPass +; CHECK-MATRIX: Running pass: LowerMatrixIntrinsicsPass ; CHECK-MATRIX-NEXT: Running analysis: TargetIRAnalysis -; CHECK-PRE-LINK-NEXT: Running pass: CanonicalizeAliasesPass +; CHECK-PRE-LINK: Running pass: CanonicalizeAliasesPass ; CHECK-PRE-LINK-NEXT: Running pass: NameAnonGlobalPass -; CHECK-THINLTO-NEXT: Running pass: Annotation2MetadataPass +; CHECK-THINLTO: Running pass: Annotation2MetadataPass ; CHECK-THINLTO-NEXT: Running pass: LowerTypeTestsPass ; CHECK-THINLTO-NEXT: Running pass: EliminateAvailableExternallyPass ; CHECK-THINLTO-NEXT: Running pass: GlobalDCEPass -; CHECK-LTO-NEXT: Running pass: Annotation2MetadataPass +; CHECK-LTO: Running pass: Annotation2MetadataPass ; CHECK-LTO-NEXT: Running pass: WholeProgramDevirtPass ; CHECK-LTO-NEXT: Running analysis: InnerAnalysisManagerProxy ; CHECK-LTO-NEXT: Running pass: LowerTypeTestsPass @@ -61,7 +60,6 @@ ; CHECK-NEXT: ret void ; CHECK-NEXT: } ; -; CHECK-NEXT: Finished llvm::Module pass manager run. declare void @bar() local_unnamed_addr diff --git a/llvm/test/Other/new-pm-defaults.ll b/llvm/test/Other/new-pm-defaults.ll --- a/llvm/test/Other/new-pm-defaults.ll +++ b/llvm/test/Other/new-pm-defaults.ll @@ -70,15 +70,13 @@ ; Suppress FileCheck --allow-unused-prefixes=false diagnostics. ; CHECK-Oz: {{^}} -; CHECK-O: Starting llvm::Module pass manager run. -; CHECK-O-NEXT: Running pass: Annotation2Metadata +; CHECK-O: Running pass: Annotation2Metadata ; CHECK-O-NEXT: Running pass: ForceFunctionAttrsPass ; CHECK-EP-PIPELINE-START-NEXT: Running pass: NoOpModulePass ; CHECK-O-NEXT: Running pass: InferFunctionAttrsPass ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-O-NEXT: Running analysis: PreservedCFGCheckerAnalysis on foo -; CHECK-O-NEXT: Starting llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis @@ -88,7 +86,6 @@ ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-O3-NEXT: Running pass: CallSiteSplittingPass -; CHECK-O-NEXT: Finished llvm::Function pass manager run. ; CHECK-O2-NEXT: Running pass: OpenMPOptPass ; CHECK-O3-NEXT: Running pass: OpenMPOptPass ; CHECK-EP-PIPELINE-EARLY-SIMPLIFICATION-NEXT: Running pass: NoOpModulePass @@ -97,7 +94,6 @@ ; CHECK-O-NEXT: Running pass: GlobalOptPass ; CHECK-O-NEXT: Running pass: PromotePass ; CHECK-O-NEXT: Running pass: DeadArgumentEliminationPass -; CHECK-O-NEXT: Starting llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis ; CHECK-O-NEXT: Running analysis: AAManager @@ -107,10 +103,8 @@ ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass -; CHECK-O-NEXT: Finished llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: ModuleInlinerWrapperPass ; CHECK-O-NEXT: Running analysis: InlineAdvisorAnalysis -; CHECK-O-NEXT: Starting llvm::Module pass manager run. ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA ; CHECK-O-NEXT: Running analysis: GlobalsAA ; CHECK-O-NEXT: Running analysis: CallGraphAnalysis @@ -121,7 +115,6 @@ ; CHECK-O-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}> ; CHECK-O-NEXT: Running pass: DevirtSCCRepeatedPass -; CHECK-O-NEXT: Starting CGSCC pass manager run. ; CHECK-O-NEXT: Running pass: InlinerPass ; CHECK-O-NEXT: Running pass: InlinerPass ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass @@ -129,7 +122,6 @@ ; CHECK-O2-NEXT: Running pass: OpenMPOptCGSCCPass on (foo) ; CHECK-O3-NEXT: Running pass: OpenMPOptCGSCCPass on (foo) ; CHECK-EP-CGSCC-LATE-NEXT: Running pass: NoOpCGSCCPass -; CHECK-O-NEXT: Starting llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis @@ -149,35 +141,27 @@ ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: ReassociatePass ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis -; CHECK-O-NEXT: Starting llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running analysis: LoopAnalysis ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished llvm::Function pass manager run. ; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy -; CHECK-O-NEXT: Starting Loop pass manager run. ; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass ; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: LoopRotatePass ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass -; CHECK-O-NEXT: Finished Loop pass manager run. ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass -; CHECK-O-NEXT: Starting llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished llvm::Function pass manager run. -; CHECK-O-NEXT: Starting Loop pass manager run. ; CHECK-O-NEXT: Running pass: LoopIdiomRecognizePass ; CHECK-O-NEXT: Running pass: IndVarSimplifyPass ; CHECK-EP-LOOP-LATE-NEXT: Running pass: NoOpLoopPass ; CHECK-O-NEXT: Running pass: LoopDeletionPass ; CHECK-O-NEXT: Running pass: LoopFullUnrollPass ; CHECK-EP-LOOP-END-NEXT: Running pass: NoOpLoopPass -; CHECK-O-NEXT: Finished Loop pass manager run. ; CHECK-O-NEXT: Running pass: SROA on foo ; CHECK-O23SZ-NEXT: Running pass: MergedLoadStoreMotionPass ; CHECK-O23SZ-NEXT: Running pass: GVN @@ -197,34 +181,26 @@ ; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis ; CHECK-O23SZ-NEXT: Running pass: MemCpyOptPass ; CHECK-O23SZ-NEXT: Running pass: DSEPass -; CHECK-O23SZ-NEXT: Starting llvm::Function pass manager run. ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass -; CHECK-O23SZ-NEXT: Finished llvm::Function pass manager run. ; CHECK-O23SZ-NEXT: Running pass: LICMPass ; CHECK-EP-SCALAR-LATE-NEXT: Running pass: NoOpFunctionPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass -; CHECK-O-NEXT: Finished llvm::Function pass manager run. -; CHECK-O-NEXT: Finished CGSCC pass manager run. -; CHECK-O-NEXT: Finished llvm::Module pass manager run. ; CHECK-O-NEXT: Running pass: GlobalOptPass ; CHECK-O-NEXT: Running pass: GlobalDCEPass ; CHECK-DEFAULT-NEXT: Running pass: EliminateAvailableExternallyPass ; CHECK-LTO-NOT: Running pass: EliminateAvailableExternallyPass ; CHECK-O-NEXT: Running pass: ReversePostOrderFunctionAttrsPass ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA -; CHECK-O-NEXT: Starting llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: Float2IntPass ; CHECK-O-NEXT: Running pass: LowerConstantIntrinsicsPass on foo ; CHECK-EP-VECTORIZER-START-NEXT: Running pass: NoOpFunctionPass ; CHECK-EXT: Running pass: {{.*}}::Bye on foo ; CHECK-NOEXT: {{^}} -; CHECK-O-NEXT: Starting llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: LoopRotatePass ; CHECK-O-NEXT: Running pass: LoopDistributePass ; CHECK-O-NEXT: Running pass: InjectTLIMappings @@ -244,10 +220,8 @@ ; CHECK-O-NEXT: Running pass: WarnMissedTransformationsPass ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis -; CHECK-O-NEXT: Starting llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: LICMPass ; CHECK-O-NEXT: Running pass: AlignmentFromAssumptionsPass ; CHECK-O-NEXT: Running pass: LoopSinkPass @@ -256,7 +230,6 @@ ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: SpeculateAroundPHIsPass ; CHECK-EP-OPTIMIZER-LAST: Running pass: NoOpFunctionPass -; CHECK-O-NEXT: Finished llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: CGProfilePass ; CHECK-O-NEXT: Running pass: GlobalDCEPass ; CHECK-O-NEXT: Running pass: ConstantMergePass @@ -282,8 +255,6 @@ ; CHECK-O: exit: ; CHECK-O-NEXT: ret void ; CHECK-O-NEXT: } -; -; CHECK-O-NEXT: Finished llvm::Module pass manager run. declare void @bar() local_unnamed_addr diff --git a/llvm/test/Other/new-pm-lto-defaults.ll b/llvm/test/Other/new-pm-lto-defaults.ll --- a/llvm/test/Other/new-pm-lto-defaults.ll +++ b/llvm/test/Other/new-pm-lto-defaults.ll @@ -25,19 +25,16 @@ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O23SZ \ ; RUN: --check-prefix=CHECK-O3 --check-prefix=CHECK-EP-Peephole -; CHECK-O: Starting llvm::Module pass manager run. -; CHECK-O-NEXT: Running pass: Annotation2Metadata +; CHECK-O: Running pass: Annotation2Metadata ; CHECK-O-NEXT: Running pass: GlobalDCEPass ; CHECK-O-NEXT: Running pass: ForceFunctionAttrsPass ; CHECK-O-NEXT: Running pass: InferFunctionAttrsPass ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Module ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis -; CHECK-O23SZ-NEXT: Starting llvm::Function pass manager run. ; CHECK-O23SZ-NEXT: Running pass: CallSiteSplittingPass on foo ; CHECK-O23SZ-NEXT: Running analysis: TargetLibraryAnalysis on foo ; CHECK-O23SZ-NEXT: Running analysis: TargetIRAnalysis on foo ; CHECK-O23SZ-NEXT: Running analysis: DominatorTreeAnalysis on foo -; CHECK-O23SZ-NEXT: Finished llvm::Function pass manager run. ; CHECK-O23SZ-NEXT: PGOIndirectCallPromotion ; CHECK-O23SZ-NEXT: Running analysis: ProfileSummaryAnalysis ; CHECK-O23SZ-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis @@ -66,29 +63,21 @@ ; CHECK-O23SZ-NEXT: Running pass: PromotePass ; CHECK-O23SZ-NEXT: Running pass: ConstantMergePass ; CHECK-O23SZ-NEXT: Running pass: DeadArgumentEliminationPass -; CHECK-O23SZ-NEXT: Starting llvm::Function pass manager run. ; CHECK-O3-NEXT: Running pass: AggressiveInstCombinePass ; CHECK-O23SZ-NEXT: Running pass: InstCombinePass ; CHECK-EP-Peephole-NEXT: Running pass: NoOpFunctionPass -; CHECK-O23SZ-NEXT: Finished llvm::Function pass manager run. ; CHECK-O23SZ-NEXT: Running pass: ModuleInlinerWrapperPass ; CHECK-O23SZ-NEXT: Running analysis: InlineAdvisorAnalysis -; CHECK-O23SZ-NEXT: Starting llvm::Module pass manager run. -; CHECK-O23SZ-NEXT: Starting CGSCC pass manager run. ; CHECK-O23SZ-NEXT: Running pass: InlinerPass ; CHECK-O23SZ-NEXT: Running pass: InlinerPass -; CHECK-O23SZ-NEXT: Finished CGSCC pass manager run. -; CHECK-O23SZ-NEXT: Finished llvm::Module pass manager run. ; CHECK-O23SZ-NEXT: Running pass: GlobalOptPass ; CHECK-O23SZ-NEXT: Running pass: GlobalDCEPass -; CHECK-O23SZ-NEXT: Starting llvm::Function pass manager run. ; CHECK-O23SZ-NEXT: Running pass: InstCombinePass ; CHECK-EP-Peephole-NEXT: Running pass: NoOpFunctionPass ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis ; CHECK-O23SZ-NEXT: Running pass: SROA on foo ; CHECK-O23SZ-NEXT: Running pass: TailCallElimPass on foo -; CHECK-O23SZ-NEXT: Finished llvm::Function pass manager run. ; CHECK-O23SZ-NEXT: Running pass: PostOrderFunctionAttrsPass on (foo) ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass on foo ; CHECK-O23SZ-NEXT: Running analysis: LoopAnalysis on foo @@ -104,15 +93,11 @@ ; CHECK-O23SZ-NEXT: Running pass: DSEPass on foo ; CHECK-O23SZ-NEXT: Running analysis: PostDominatorTreeAnalysis on foo ; CHECK-O23SZ-NEXT: Running pass: MergedLoadStoreMotionPass on foo -; CHECK-O23SZ-NEXT: Starting llvm::Function pass manager run. ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass on foo ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass on foo -; CHECK-O23SZ-NEXT: Finished llvm::Function pass manager run. -; CHECK-O23SZ-NEXT: Starting Loop pass manager run. ; CHECK-O23SZ-NEXT: Running pass: IndVarSimplifyPass on Loop ; CHECK-O23SZ-NEXT: Running pass: LoopDeletionPass on Loop ; CHECK-O23SZ-NEXT: Running pass: LoopFullUnrollPass on Loop -; CHECK-O23SZ-NEXT: Finished Loop pass manager run. ; CHECK-O23SZ-NEXT: Running pass: LoopDistributePass on foo ; CHECK-O23SZ-NEXT: Running pass: LoopVectorizePass on foo ; CHECK-O23SZ-NEXT: Running analysis: BlockFrequencyAnalysis on foo @@ -156,7 +141,6 @@ ; CHECK-O-NEXT: ret void ; CHECK-O-NEXT: } ; -; CHECK-O-NEXT: Finished llvm::Module pass manager run. declare void @bar() local_unnamed_addr diff --git a/llvm/test/Other/new-pm-pgo-preinline.ll b/llvm/test/Other/new-pm-pgo-preinline.ll --- a/llvm/test/Other/new-pm-pgo-preinline.ll +++ b/llvm/test/Other/new-pm-pgo-preinline.ll @@ -3,20 +3,16 @@ ; CHECK-Osz: Running pass: ModuleInlinerWrapperPass ; CHECK-Osz-NEXT: Running analysis: InlineAdvisorAnalysis -; CHECK-Osz-NEXT: Starting {{.*}}Module pass manager run. ; CHECK-Osz-NEXT: Running analysis: InnerAnalysisManagerProxy ; CHECK-Osz-NEXT: Running analysis: LazyCallGraphAnalysis ; CHECK-Osz-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy on (foo) ; CHECK-Osz-NEXT: Running analysis: OuterAnalysisManagerProxy -; CHECK-Osz-NEXT: Starting CGSCC pass manager run. ; CHECK-Osz-NEXT: Running pass: InlinerPass on (foo) ; CHECK-Osz-NEXT: Running pass: InlinerPass on (foo) ; CHECK-Osz-NEXT: Running pass: SROA on foo ; CHECK-Osz-NEXT: Running pass: EarlyCSEPass on foo ; CHECK-Osz-NEXT: Running pass: SimplifyCFGPass on foo ; CHECK-Osz-NEXT: Running pass: InstCombinePass on foo -; CHECK-Osz-NEXT: Finished CGSCC pass manager run. -; CHECK-Osz-NEXT: Finished {{.*}}Module pass manager run. ; CHECK-Osz-NEXT: Running pass: GlobalDCEPass ; CHECK-Osz-NEXT: Running pass: PGOInstrumentationGen diff --git a/llvm/test/Other/new-pm-thinlto-defaults.ll b/llvm/test/Other/new-pm-thinlto-defaults.ll --- a/llvm/test/Other/new-pm-thinlto-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-defaults.ll @@ -50,8 +50,7 @@ ; Suppress FileCheck --allow-unused-prefixes=false diagnostics. ; CHECK-NOEXT: {{^}} -; CHECK-O: Starting llvm::Module pass manager run. -; CHECK-O-NEXT: Running pass: Annotation2Metadata +; CHECK-O: Running pass: Annotation2Metadata ; CHECK-O-NEXT: Running pass: ForceFunctionAttrsPass ; CHECK-EP-PIPELINE-START-NEXT: Running pass: NoOpModulePass ; CHECK-DIS-NEXT: Running analysis: InnerAnalysisManagerProxy @@ -63,7 +62,6 @@ ; CHECK-O-NEXT: Running pass: InferFunctionAttrsPass ; CHECK-PRELINK-O-NODIS-NEXT: Running analysis: InnerAnalysisManagerProxy ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis -; CHECK-O-NEXT: Starting llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis @@ -73,7 +71,6 @@ ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-O3-NEXT: Running pass: CallSiteSplittingPass -; CHECK-O-NEXT: Finished llvm::Function pass manager run. ; CHECK-O2-NEXT: Running pass: OpenMPOptPass ; CHECK-O3-NEXT: Running pass: OpenMPOptPass ; CHECK-POSTLINK-O-NEXT: Running pass: LowerTypeTestsPass @@ -82,7 +79,6 @@ ; CHECK-O-NEXT: Running pass: GlobalOptPass ; CHECK-O-NEXT: Running pass: PromotePass ; CHECK-O-NEXT: Running pass: DeadArgumentEliminationPass -; CHECK-O-NEXT: Starting llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-PRELINK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis ; CHECK-O-NEXT: Running analysis: AAManager @@ -91,10 +87,8 @@ ; CHECK-O-NEXT: Running analysis: TypeBasedAA ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy ; CHECK-O-NEXT: Running pass: SimplifyCFGPass -; CHECK-O-NEXT: Finished llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: ModuleInlinerWrapperPass ; CHECK-O-NEXT: Running analysis: InlineAdvisorAnalysis -; CHECK-O-NEXT: Starting llvm::Module pass manager run. ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA ; CHECK-O-NEXT: Running analysis: GlobalsAA ; CHECK-O-NEXT: Running analysis: CallGraphAnalysis @@ -105,14 +99,12 @@ ; CHECK-O-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy ; CHECK-O-NEXT: Running pass: DevirtSCCRepeatedPass -; CHECK-O-NEXT: Starting CGSCC pass manager run. ; CHECK-O-NEXT: Running pass: InlinerPass ; CHECK-O-NEXT: Running pass: InlinerPass ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass ; CHECK-O3-NEXT: Running pass: ArgumentPromotionPass ; CHECK-O2-NEXT: Running pass: OpenMPOptCGSCCPass on (foo) ; CHECK-O3-NEXT: Running pass: OpenMPOptCGSCCPass on (foo) -; CHECK-O-NEXT: Starting llvm::Function pass manager run. ; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis @@ -131,33 +123,25 @@ ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: ReassociatePass ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis -; CHECK-O-NEXT: Starting llvm::Function pass manager run ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running analysis: LoopAnalysis ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished llvm::Function pass manager run ; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy -; CHECK-O-NEXT: Starting Loop pass manager run. ; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass ; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: LoopRotatePass ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass -; CHECK-O-NEXT: Finished Loop pass manager run. ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass -; CHECK-O-NEXT: Starting llvm::Function pass manager run ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished llvm::Function pass manager run -; CHECK-O-NEXT: Starting Loop pass manager run. ; CHECK-O-NEXT: Running pass: LoopIdiomRecognizePass ; CHECK-O-NEXT: Running pass: IndVarSimplifyPass ; CHECK-O-NEXT: Running pass: LoopDeletionPass ; CHECK-O-NEXT: Running pass: LoopFullUnrollPass -; CHECK-O-NEXT: Finished Loop pass manager run. ; CHECK-O-NEXT: Running pass: SROA on foo ; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass ; CHECK-Os-NEXT: Running pass: GVN @@ -188,30 +172,22 @@ ; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis ; CHECK-O23SZ-NEXT: Running pass: MemCpyOptPass ; CHECK-O23SZ-NEXT: Running pass: DSEPass -; CHECK-O23SZ-NEXT: Starting llvm::Function pass manager run ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass -; CHECK-O23SZ-NEXT: Finished llvm::Function pass manager run ; CHECK-O23SZ-NEXT: Running pass: LICMPass on Loop at depth 1 containing: %loop ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass -; CHECK-O-NEXT: Finished llvm::Function pass manager run. -; CHECK-O-NEXT: Finished CGSCC pass manager run. -; CHECK-O-NEXT: Finished llvm::Module pass manager run. ; CHECK-PRELINK-O-NEXT: Running pass: GlobalOptPass ; CHECK-POSTLINK-O-NEXT: Running pass: GlobalOptPass ; CHECK-POSTLINK-O-NEXT: Running pass: GlobalDCEPass ; CHECK-POSTLINK-O-NEXT: Running pass: EliminateAvailableExternallyPass ; CHECK-POSTLINK-O-NEXT: Running pass: ReversePostOrderFunctionAttrsPass ; CHECK-POSTLINK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA -; CHECK-POSTLINK-O-NEXT: Starting llvm::Function pass manager run. ; CHECK-POSTLINK-O-NEXT: Running pass: Float2IntPass ; CHECK-POSTLINK-O-NEXT: Running pass: LowerConstantIntrinsicsPass ; CHECK-EXT: Running pass: {{.*}}::Bye -; CHECK-POSTLINK-O-NEXT: Starting llvm::Function pass manager run ; CHECK-POSTLINK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-POSTLINK-O-NEXT: Running pass: LCSSAPass -; CHECK-POSTLINK-O-NEXT: Finished llvm::Function pass manager run ; CHECK-POSTLINK-O-NEXT: Running pass: LoopRotatePass ; CHECK-POSTLINK-O-NEXT: Running pass: LoopDistributePass ; CHECK-POSTLINK-O-NEXT: Running pass: InjectTLIMappings @@ -231,10 +207,8 @@ ; CHECK-POSTLINK-O-NEXT: Running pass: WarnMissedTransformationsPass ; CHECK-POSTLINK-O-NEXT: Running pass: InstCombinePass ; CHECK-POSTLINK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis -; CHECK-POSTLINK-O-NEXT: Starting llvm::Function pass manager run ; CHECK-POSTLINK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-POSTLINK-O-NEXT: Running pass: LCSSAPass -; CHECK-POSTLINK-O-NEXT: Finished llvm::Function pass manager run ; CHECK-POSTLINK-O-NEXT: Running pass: LICMPass ; CHECK-POSTLINK-O-NEXT: Running pass: AlignmentFromAssumptionsPass ; CHECK-POSTLINK-O-NEXT: Running pass: LoopSinkPass @@ -242,7 +216,6 @@ ; CHECK-POSTLINK-O-NEXT: Running pass: DivRemPairsPass ; CHECK-POSTLINK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-POSTLINK-O-NEXT: Running pass: SpeculateAroundPHIsPass -; CHECK-POSTLINK-O-NEXT: Finished llvm::Function pass manager run. ; CHECK-POSTLINK-O-NEXT: Running pass: CGProfilePass ; CHECK-POSTLINK-O-NEXT: Running pass: GlobalDCEPass ; CHECK-POSTLINK-O-NEXT: Running pass: ConstantMergePass @@ -267,7 +240,6 @@ ; CHECK-O-NEXT: ret void ; CHECK-O-NEXT: } ; -; CHECK-O-NEXT: Finished llvm::Module pass manager run. declare void @bar() local_unnamed_addr diff --git a/llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll b/llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll --- a/llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll @@ -23,8 +23,7 @@ ; Suppress FileCheck --allow-unused-prefixes=false diagnostics. ; CHECK-NOEXT: {{^}} -; CHECK-O: Starting {{.*}}Module pass manager run. -; CHECK-O-NEXT: Running pass: Annotation2Metadata +; CHECK-O: Running pass: Annotation2Metadata ; CHECK-O-NEXT: Running pass: ForceFunctionAttrsPass ; CHECK-EP-PIPELINE-START-NEXT: Running pass: NoOpModulePass ; CHECK-O-NEXT: Running pass: PGOIndirectCallPromotion @@ -33,7 +32,6 @@ ; CHECK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis ; CHECK-O-NEXT: Running pass: InferFunctionAttrsPass ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis @@ -43,7 +41,6 @@ ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-O3-NEXT: Running pass: CallSiteSplittingPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run. ; CHECK-O2-NEXT: Running pass: OpenMPOptPass ; CHECK-O3-NEXT: Running pass: OpenMPOptPass ; CHECK-O-NEXT: Running pass: LowerTypeTestsPass @@ -52,7 +49,6 @@ ; CHECK-O-NEXT: Running pass: GlobalOptPass ; CHECK-O-NEXT: Running pass: PromotePass ; CHECK-O-NEXT: Running pass: DeadArgumentEliminationPass -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-O-NEXT: Running analysis: AAManager ; CHECK-O-NEXT: Running analysis: BasicAA @@ -66,10 +62,8 @@ ; CHECK-O-DAG: Running analysis: BranchProbabilityAnalysis on foo ; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis on foo ; CHECK-O-NEXT: Running pass: SimplifyCFGPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: ModuleInlinerWrapperPass ; CHECK-O-NEXT: Running analysis: InlineAdvisorAnalysis -; CHECK-O-NEXT: Starting {{.*}}Module pass manager run. ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA ; CHECK-O-NEXT: Running analysis: GlobalsAA ; CHECK-O-NEXT: Running analysis: CallGraphAnalysis @@ -79,14 +73,12 @@ ; CHECK-O-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}> ; CHECK-O-NEXT: Running pass: DevirtSCCRepeatedPass -; CHECK-O-NEXT: Starting CGSCC pass manager run. ; CHECK-O-NEXT: Running pass: InlinerPass ; CHECK-O-NEXT: Running pass: InlinerPass ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass ; CHECK-O3-NEXT: Running pass: ArgumentPromotionPass ; CHECK-O2-NEXT: Running pass: OpenMPOptCGSCCPass ; CHECK-O3-NEXT: Running pass: OpenMPOptCGSCCPass -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis @@ -105,32 +97,24 @@ ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: ReassociatePass ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run ; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy -; CHECK-O-NEXT: Starting Loop pass manager run. ; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass ; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: LoopRotatePass ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass -; CHECK-O-NEXT: Finished Loop pass manager run. ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run -; CHECK-O-NEXT: Starting Loop pass manager run. ; CHECK-O-NEXT: Running pass: LoopIdiomRecognizePass ; CHECK-O-NEXT: Running pass: IndVarSimplifyPass ; CHECK-O-NEXT: Running pass: LoopDeletionPass ; CHECK-O-NEXT: Running pass: LoopFullUnrollPass -; CHECK-O-NEXT: Finished Loop pass manager run. ; CHECK-O-NEXT: Running pass: SROA on foo ; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass ; CHECK-Os-NEXT: Running pass: GVN @@ -160,29 +144,21 @@ ; CHECK-O-NEXT: Running pass: ADCEPass ; CHECK-O23SZ-NEXT: Running pass: MemCpyOptPass ; CHECK-O23SZ-NEXT: Running pass: DSEPass -; CHECK-O23SZ-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass -; CHECK-O23SZ-NEXT: Finished {{.*}}Function pass manager run ; CHECK-O23SZ-NEXT: Running pass: LICMPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run. -; CHECK-O-NEXT: Finished CGSCC pass manager run. -; CHECK-O-NEXT: Finished {{.*}}Module pass manager run. ; CHECK-O-NEXT: Running pass: GlobalOptPass ; CHECK-O-NEXT: Running pass: GlobalDCEPass ; CHECK-O-NEXT: Running pass: EliminateAvailableExternallyPass ; CHECK-O-NEXT: Running pass: ReversePostOrderFunctionAttrsPass ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: Float2IntPass ; CHECK-O-NEXT: Running pass: LowerConstantIntrinsicsPass ; CHECK-EXT: Running pass: {{.*}}::Bye -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: LoopSimplifyPass on foo ; CHECK-O-NEXT: Running pass: LCSSAPass on foo -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: LoopRotatePass ; CHECK-O-NEXT: Running pass: LoopDistributePass ; CHECK-O-NEXT: Running pass: InjectTLIMappings @@ -200,10 +176,8 @@ ; CHECK-O-NEXT: Running pass: WarnMissedTransformationsPass ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: LICMPass ; CHECK-O-NEXT: Running pass: AlignmentFromAssumptionsPass ; CHECK-O-NEXT: Running pass: LoopSinkPass @@ -211,7 +185,6 @@ ; CHECK-O-NEXT: Running pass: DivRemPairsPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: SpeculateAroundPHIsPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: CGProfilePass ; CHECK-O-NEXT: Running pass: GlobalDCEPass ; CHECK-O-NEXT: Running pass: ConstantMergePass @@ -236,7 +209,6 @@ ; ; Ignore a bunch of intervening metadata containing profile data. ; -; CHECK-O: Finished {{.*}}Module pass manager run. declare void @bar() local_unnamed_addr diff --git a/llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll b/llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll --- a/llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll @@ -28,14 +28,12 @@ ; Suppress FileCheck --allow-unused-prefixes=false diagnostics. ; CHECK-NOEXT: {{^}} -; CHECK-O: Starting {{.*}}Module pass manager run. -; CHECK-O-NEXT: Running pass: Annotation2Metadata +; CHECK-O: Running pass: Annotation2Metadata ; CHECK-O-NEXT: Running pass: ForceFunctionAttrsPass ; CHECK-EP-PIPELINE-START-NEXT: Running pass: NoOpModulePass ; CHECK-O-NEXT: Running pass: InferFunctionAttrsPass ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis @@ -52,7 +50,6 @@ ; CHECK-O-NEXT: Running analysis: ScopedNoAliasAA ; CHECK-O-NEXT: Running analysis: TypeBasedAA ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: SampleProfileLoaderPass ; CHECK-O-NEXT: Running analysis: ProfileSummaryAnalysis ; CHECK-O-NEXT: Running analysis: CallGraphAnalysis @@ -66,7 +63,6 @@ ; CHECK-O-NEXT: Running pass: GlobalOptPass ; CHECK-O-NEXT: Running pass: PromotePass ; CHECK-O-NEXT: Running pass: DeadArgumentEliminationPass -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-O-NEXT: Running analysis: BlockFrequencyAnalysis on foo ; These next two can appear in any order since they are accessed as parameters @@ -75,11 +71,9 @@ ; CHECK-O-DAG: Running analysis: BranchProbabilityAnalysis on foo ; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis on foo ; CHECK-O-NEXT: Running pass: SimplifyCFGPass on foo -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: ModuleInlinerWrapperPass ; CHECK-O-NEXT: Running analysis: InlineAdvisorAnalysis -; CHECK-O-NEXT: Starting {{.*}}Module pass manager run. ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA ; CHECK-O-NEXT: Running analysis: GlobalsAA ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}ProfileSummaryAnalysis @@ -88,14 +82,12 @@ ; CHECK-O-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy ; CHECK-O-NEXT: Running pass: DevirtSCCRepeatedPass -; CHECK-O-NEXT: Starting CGSCC pass manager run. ; CHECK-O-NEXT: Running pass: InlinerPass ; CHECK-O-NEXT: Running pass: InlinerPass ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass ; CHECK-O3-NEXT: Running pass: ArgumentPromotionPass ; CHECK-O2-NEXT: Running pass: OpenMPOptCGSCCPass ; CHECK-O3-NEXT: Running pass: OpenMPOptCGSCCPass -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis @@ -114,32 +106,24 @@ ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: ReassociatePass ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run ; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy -; CHECK-O-NEXT: Starting Loop pass manager run. ; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass ; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: LoopRotatePass ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass -; CHECK-O-NEXT: Finished Loop pass manager run. ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run -; CHECK-O-NEXT: Starting Loop pass manager run. ; CHECK-O-NEXT: Running pass: LoopIdiomRecognizePass ; CHECK-O-NEXT: Running pass: IndVarSimplifyPass ; CHECK-O-NEXT: Running pass: LoopDeletionPass ; CHECK-O-NEXT: Running pass: LoopFullUnrollPass -; CHECK-O-NEXT: Finished Loop pass manager run. ; CHECK-O-NEXT: Running pass: SROA on foo ; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass ; CHECK-Os-NEXT: Running pass: GVN @@ -169,32 +153,24 @@ ; CHECK-O-NEXT: Running pass: ADCEPass ; CHECK-O23SZ-NEXT: Running pass: MemCpyOptPass ; CHECK-O23SZ-NEXT: Running pass: DSEPass -; CHECK-O23SZ-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass -; CHECK-O23SZ-NEXT: Finished {{.*}}Function pass manager run ; CHECK-O23SZ-NEXT: Running pass: LICMPass ; 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: Finished {{.*}}Function pass manager run. -; CHECK-O-NEXT: Finished CGSCC pass manager run. -; CHECK-O-NEXT: Finished {{.*}}Module pass manager run. ; CHECK-O-NEXT: Running pass: GlobalOptPass ; CHECK-O-NEXT: Running pass: GlobalDCEPass ; CHECK-O-NEXT: Running pass: EliminateAvailableExternallyPass ; CHECK-O-NEXT: Running pass: ReversePostOrderFunctionAttrsPass ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: Float2IntPass ; CHECK-O-NEXT: Running pass: LowerConstantIntrinsicsPass ; CHECK-EXT: Running pass: {{.*}}::Bye -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: LoopRotatePass ; CHECK-O-NEXT: Running pass: LoopDistributePass ; CHECK-O-NEXT: Running pass: InjectTLIMappings @@ -212,10 +188,8 @@ ; CHECK-O-NEXT: Running pass: WarnMissedTransformationsPass ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: LICMPass ; CHECK-O-NEXT: Running pass: AlignmentFromAssumptionsPass ; CHECK-O-NEXT: Running pass: LoopSinkPass @@ -223,7 +197,6 @@ ; CHECK-O-NEXT: Running pass: DivRemPairsPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: SpeculateAroundPHIsPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: CGProfilePass ; CHECK-O-NEXT: Running pass: GlobalDCEPass ; CHECK-O-NEXT: Running pass: ConstantMergePass @@ -248,7 +221,6 @@ ; ; Ignore a bunch of intervening metadata containing profile data. ; -; CHECK-O: Finished {{.*}}Module pass manager run. declare void @bar() local_unnamed_addr diff --git a/llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll b/llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll --- a/llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll @@ -27,14 +27,12 @@ ; RUN: -passes='thinlto-pre-link' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-O123SZ ; -; CHECK-O: Starting {{.*}}Module pass manager run. -; CHECK-O-NEXT: Running pass: Annotation2Metadata +; CHECK-O: Running pass: Annotation2Metadata ; CHECK-O-NEXT: Running pass: ForceFunctionAttrsPass ; CHECK-EP-PIPELINE-START-NEXT: Running pass: NoOpModulePass ; CHECK-O-NEXT: Running pass: InferFunctionAttrsPass ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis @@ -44,7 +42,6 @@ ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis ; CHECK-O3-NEXT: Running pass: CallSiteSplittingPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run. ; CHECK-O2-NEXT: Running pass: OpenMPOptPass ; CHECK-O3-NEXT: Running pass: OpenMPOptPass ; CHECK-O-NEXT: Running pass: IPSCCPPass @@ -52,7 +49,6 @@ ; CHECK-O-NEXT: Running pass: GlobalOptPass ; CHECK-O-NEXT: Running pass: PromotePass ; CHECK-O-NEXT: Running pass: DeadArgumentEliminationPass -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis ; CHECK-O-NEXT: Running analysis: AAManager @@ -61,23 +57,18 @@ ; CHECK-O-NEXT: Running analysis: TypeBasedAA ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy ; CHECK-O-NEXT: Running pass: SimplifyCFGPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run. ; CHECK-O123SZ-NEXT: Running pass: ModuleInlinerWrapperPass ; CHECK-O123SZ-NEXT: Running analysis: InlineAdvisorAnalysis -; CHECK-O123SZ-NEXT: Starting {{.*}}Module pass manager run. ; CHECK-O123SZ-NEXT: Running analysis: InnerAnalysisManagerProxy ; CHECK-O123SZ-NEXT: Running analysis: LazyCallGraphAnalysis ; CHECK-O123SZ-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy on (foo) ; CHECK-O123SZ-NEXT: Running analysis: OuterAnalysisManagerProxy -; CHECK-O123SZ-NEXT: Starting CGSCC pass manager run. ; CHECK-O123SZ-NEXT: Running pass: InlinerPass on (foo) ; CHECK-O123SZ-NEXT: Running pass: InlinerPass on (foo) ; CHECK-O123SZ-NEXT: Running pass: SROA on foo ; CHECK-O123SZ-NEXT: Running pass: EarlyCSEPass on foo ; CHECK-O123SZ-NEXT: Running pass: SimplifyCFGPass on foo ; CHECK-O123SZ-NEXT: Running pass: InstCombinePass on foo -; CHECK-O123SZ-NEXT: Finished CGSCC pass manager run. -; CHECK-O123SZ-NEXT: Finished {{.*}}Module pass manager run. ; CHECK-O123SZ-NEXT: Running pass: GlobalDCEPass ; CHECK-O-NEXT: Running pass: PGOInstrumentationUse ; These next two can appear in any order since they are accessed as parameters @@ -94,7 +85,6 @@ ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy ; CHECK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis on foo ; CHECK-O-NEXT: Running pass: ModuleInlinerWrapperPass -; CHECK-O-NEXT: Starting {{.*}}Module pass manager run. ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA ; CHECK-O-NEXT: Running analysis: GlobalsAA ; CHECK-O-NEXT: Running analysis: CallGraphAnalysis @@ -105,7 +95,6 @@ ; CHECK-O-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}> ; CHECK-O-NEXT: Running pass: DevirtSCCRepeatedPass -; CHECK-O-NEXT: Starting CGSCC pass manager run. ; CHECK-O-NEXT: Running pass: InlinerPass ; CHECK-O-NEXT: Running pass: InlinerPass ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass @@ -120,7 +109,6 @@ ; CHECK-O3-NEXT: Running analysis: TargetIRAnalysis ; CHECK-O2-NEXT: Running pass: OpenMPOptCGSCCPass ; CHECK-O3-NEXT: Running pass: OpenMPOptCGSCCPass -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O1-NEXT: Running analysis: TargetIRAnalysis on foo @@ -151,32 +139,24 @@ ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: ReassociatePass ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run ; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy -; CHECK-O-NEXT: Starting Loop pass manager run. ; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass ; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: LoopRotatePass ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass -; CHECK-O-NEXT: Finished Loop pass manager run. ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run -; CHECK-O-NEXT: Starting Loop pass manager run. ; CHECK-O-NEXT: Running pass: LoopIdiomRecognizePass ; CHECK-O-NEXT: Running pass: IndVarSimplifyPass ; CHECK-O-NEXT: Running pass: LoopDeletionPass ; CHECK-O-NEXT: Running pass: LoopFullUnrollPass -; CHECK-O-NEXT: Finished Loop pass manager run. ; CHECK-O-NEXT: Running pass: SROA on foo ; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass ; CHECK-Os-NEXT: Running pass: GVN @@ -206,19 +186,14 @@ ; CHECK-O-NEXT: Running pass: ADCEPass ; CHECK-O23SZ-NEXT: Running pass: MemCpyOptPass ; CHECK-O23SZ-NEXT: Running pass: DSEPass -; CHECK-O23SZ-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass -; CHECK-O23SZ-NEXT: Finished {{.*}}Function pass manager run ; CHECK-O23SZ-NEXT: Running pass: LICMPass ; 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: Finished {{.*}}Function pass manager run. -; CHECK-O-NEXT: Finished CGSCC pass manager run. -; CHECK-O-NEXT: Finished {{.*}}Module pass manager run. ; CHECK-O-NEXT: Running pass: GlobalOptPass ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis on bar ; CHECK-EXT: Running pass: {{.*}}::Bye @@ -243,7 +218,6 @@ ; ; Ignore a bunch of intervening metadata containing profile data. ; -; CHECK-O: Finished {{.*}}Module pass manager run. declare void @bar() local_unnamed_addr diff --git a/llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll b/llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll --- a/llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll @@ -25,15 +25,13 @@ ; RUN: -passes='thinlto-pre-link' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ ; -; CHECK-O: Starting {{.*}}Module pass manager run. -; CHECK-O-NEXT: Running pass: Annotation2Metadata +; CHECK-O: Running pass: Annotation2Metadata ; CHECK-O-NEXT: Running pass: ForceFunctionAttrsPass ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy ; CHECK-O-NEXT: Running pass: AddDiscriminatorsPass ; CHECK-EP-PIPELINE-START-NEXT: Running pass: NoOpModulePass ; CHECK-O-NEXT: Running pass: InferFunctionAttrsPass ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis @@ -50,7 +48,6 @@ ; CHECK-O-NEXT: Running analysis: ScopedNoAliasAA ; CHECK-O-NEXT: Running analysis: TypeBasedAA ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: SampleProfileLoaderPass ; CHECK-O-NEXT: Running analysis: ProfileSummaryAnalysis ; CHECK-O-NEXT: Running analysis: CallGraphAnalysis @@ -62,7 +59,6 @@ ; CHECK-O-NEXT: Running pass: GlobalOptPass ; CHECK-O-NEXT: Running pass: PromotePass ; CHECK-O-NEXT: Running pass: DeadArgumentEliminationPass -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-O-NEXT: Running analysis: BlockFrequencyAnalysis on foo ; These next two can appear in any order since they are accessed as parameters @@ -71,10 +67,8 @@ ; CHECK-O-DAG: Running analysis: BranchProbabilityAnalysis on foo ; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis on foo ; CHECK-O-NEXT: Running pass: SimplifyCFGPass on foo -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: ModuleInlinerWrapperPass ; CHECK-O-NEXT: Running analysis: InlineAdvisorAnalysis -; CHECK-O-NEXT: Starting {{.*}}Module pass manager run. ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA ; CHECK-O-NEXT: Running analysis: GlobalsAA ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}ProfileSummaryAnalysis @@ -83,14 +77,12 @@ ; CHECK-O-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}> ; CHECK-O-NEXT: Running pass: DevirtSCCRepeatedPass -; CHECK-O-NEXT: Starting CGSCC pass manager run. ; CHECK-O-NEXT: Running pass: InlinerPass ; CHECK-O-NEXT: Running pass: InlinerPass ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass ; CHECK-O3-NEXT: Running pass: ArgumentPromotionPass ; CHECK-O2-NEXT: Running pass: OpenMPOptCGSCCPass ; CHECK-O3-NEXT: Running pass: OpenMPOptCGSCCPass -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run. ; CHECK-O-NEXT: Running pass: SROA ; CHECK-O-NEXT: Running pass: EarlyCSEPass ; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis @@ -109,31 +101,23 @@ ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: ReassociatePass ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run ; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy -; CHECK-O-NEXT: Starting Loop pass manager run. ; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass ; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: LoopRotatePass ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass -; CHECK-O-NEXT: Finished Loop pass manager run. ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass -; CHECK-O-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O-NEXT: Running pass: LoopSimplifyPass ; CHECK-O-NEXT: Running pass: LCSSAPass -; CHECK-O-NEXT: Finished {{.*}}Function pass manager run -; CHECK-O-NEXT: Starting Loop pass manager run. ; CHECK-O-NEXT: Running pass: LoopIdiomRecognizePass ; CHECK-O-NEXT: Running pass: IndVarSimplifyPass ; CHECK-O-NEXT: Running pass: LoopDeletionPass -; CHECK-O-NEXT: Finished Loop pass manager run. ; CHECK-O-NEXT: Running pass: SROA on foo ; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass ; CHECK-Os-NEXT: Running pass: GVN @@ -163,19 +147,14 @@ ; CHECK-O-NEXT: Running pass: ADCEPass ; CHECK-O23SZ-NEXT: Running pass: MemCpyOptPass ; CHECK-O23SZ-NEXT: Running pass: DSEPass -; CHECK-O23SZ-NEXT: Starting {{.*}}Function pass manager run ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass -; CHECK-O23SZ-NEXT: Finished {{.*}}Function pass manager run ; CHECK-O23SZ-NEXT: Running pass: LICMPass ; 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: Finished {{.*}}Function pass manager run. -; CHECK-O-NEXT: Finished CGSCC pass manager run. -; CHECK-O-NEXT: Finished {{.*}}Module pass manager run. ; CHECK-O-NEXT: Running pass: GlobalOptPass ; CHECK-O-NEXT: Running pass: AnnotationRemarksPass on foo ; CHECK-O-NEXT: Running pass: CanonicalizeAliasesPass @@ -198,7 +177,6 @@ ; ; Ignore a bunch of intervening metadata containing profile data. ; -; CHECK-O: Finished {{.*}}Module pass manager run. declare void @bar() local_unnamed_addr diff --git a/llvm/test/Other/pass-pipeline-parsing.ll b/llvm/test/Other/pass-pipeline-parsing.ll --- a/llvm/test/Other/pass-pipeline-parsing.ll +++ b/llvm/test/Other/pass-pipeline-parsing.ll @@ -1,50 +1,34 @@ ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes=no-op-module,no-op-module %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-TWO-NOOP-MP -; CHECK-TWO-NOOP-MP: Starting llvm::Module pass manager run ; CHECK-TWO-NOOP-MP: Running pass: NoOpModulePass ; CHECK-TWO-NOOP-MP: Running pass: NoOpModulePass -; CHECK-TWO-NOOP-MP: Finished llvm::Module pass manager run ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='module(no-op-module,no-op-module)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-NESTED-TWO-NOOP-MP -; CHECK-NESTED-TWO-NOOP-MP: Starting llvm::Module pass manager run ; CHECK-NESTED-TWO-NOOP-MP: Running pass: NoOpModulePass ; CHECK-NESTED-TWO-NOOP-MP: Running pass: NoOpModulePass -; CHECK-NESTED-TWO-NOOP-MP: Finished llvm::Module pass manager run ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes=no-op-function,no-op-function %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-TWO-NOOP-FP -; CHECK-TWO-NOOP-FP: Starting llvm::Module pass manager run -; CHECK-TWO-NOOP-FP: Starting llvm::Function pass manager run ; CHECK-TWO-NOOP-FP: Running pass: NoOpFunctionPass ; CHECK-TWO-NOOP-FP: Running pass: NoOpFunctionPass -; CHECK-TWO-NOOP-FP: Finished llvm::Function pass manager run -; CHECK-TWO-NOOP-FP: Finished llvm::Module pass manager run ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='function(no-op-function,no-op-function)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-NESTED-TWO-NOOP-FP -; CHECK-NESTED-TWO-NOOP-FP: Starting llvm::Module pass manager run -; CHECK-NESTED-TWO-NOOP-FP: Starting llvm::Function pass manager run ; CHECK-NESTED-TWO-NOOP-FP: Running pass: NoOpFunctionPass ; CHECK-NESTED-TWO-NOOP-FP: Running pass: NoOpFunctionPass -; CHECK-NESTED-TWO-NOOP-FP: Finished llvm::Function pass manager run -; CHECK-NESTED-TWO-NOOP-FP: Finished llvm::Module pass manager run ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='no-op-module,function(no-op-function,no-op-function),no-op-module' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-MIXED-FP-AND-MP -; CHECK-MIXED-FP-AND-MP: Starting llvm::Module pass manager run ; CHECK-MIXED-FP-AND-MP: Running pass: NoOpModulePass -; CHECK-MIXED-FP-AND-MP: Starting llvm::Function pass manager run ; CHECK-MIXED-FP-AND-MP: Running pass: NoOpFunctionPass ; CHECK-MIXED-FP-AND-MP: Running pass: NoOpFunctionPass -; CHECK-MIXED-FP-AND-MP: Finished llvm::Function pass manager run ; CHECK-MIXED-FP-AND-MP: Running pass: NoOpModulePass -; CHECK-MIXED-FP-AND-MP: Finished llvm::Module pass manager run ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -aa-pipeline= -passes='require' %s 2>&1 \ @@ -126,43 +110,23 @@ ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes=no-op-cgscc,no-op-cgscc %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-TWO-NOOP-CG -; CHECK-TWO-NOOP-CG: Starting llvm::Module pass manager run -; CHECK-TWO-NOOP-CG: Starting CGSCC pass manager run ; CHECK-TWO-NOOP-CG: Running pass: NoOpCGSCCPass ; CHECK-TWO-NOOP-CG: Running pass: NoOpCGSCCPass -; CHECK-TWO-NOOP-CG: Finished CGSCC pass manager run -; CHECK-TWO-NOOP-CG: Finished llvm::Module pass manager run ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='module(function(no-op-function),cgscc(no-op-cgscc,function(no-op-function),no-op-cgscc),function(no-op-function))' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-NESTED-MP-CG-FP -; CHECK-NESTED-MP-CG-FP: Starting llvm::Module pass manager run -; CHECK-NESTED-MP-CG-FP: Starting llvm::Function pass manager run ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpFunctionPass -; CHECK-NESTED-MP-CG-FP: Finished llvm::Function pass manager run -; CHECK-NESTED-MP-CG-FP: Starting CGSCC pass manager run ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpCGSCCPass -; CHECK-NESTED-MP-CG-FP: Starting llvm::Function pass manager run ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpFunctionPass -; CHECK-NESTED-MP-CG-FP: Finished llvm::Function pass manager run ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpCGSCCPass -; CHECK-NESTED-MP-CG-FP: Finished CGSCC pass manager run -; CHECK-NESTED-MP-CG-FP: Starting llvm::Function pass manager run ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpFunctionPass -; CHECK-NESTED-MP-CG-FP: Finished llvm::Function pass manager run -; CHECK-NESTED-MP-CG-FP: Finished llvm::Module pass manager run ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='no-op-loop,no-op-loop' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-TWO-NOOP-LOOP -; CHECK-TWO-NOOP-LOOP: Starting llvm::Module pass manager run -; CHECK-TWO-NOOP-LOOP: Starting llvm::Function pass manager run -; CHECK-TWO-NOOP-LOOP: Starting Loop pass manager run ; CHECK-TWO-NOOP-LOOP: Running pass: NoOpLoopPass ; CHECK-TWO-NOOP-LOOP: Running pass: NoOpLoopPass -; CHECK-TWO-NOOP-LOOP: Finished Loop pass manager run -; CHECK-TWO-NOOP-LOOP: Finished llvm::Function pass manager run -; CHECK-TWO-NOOP-LOOP: Finished llvm::Module pass manager run ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='module(function(loop(no-op-loop)))' %s 2>&1 \ @@ -176,49 +140,35 @@ ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='no-op-loop' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-NESTED-FP-LP -; CHECK-NESTED-FP-LP: Starting llvm::Module pass manager run -; CHECK-NESTED-FP-LP: Starting llvm::Function pass manager run -; CHECK-NESTED-FP-LP: Starting Loop pass manager run ; CHECK-NESTED-FP-LP: Running pass: NoOpLoopPass -; CHECK-NESTED-FP-LP: Finished Loop pass manager run -; CHECK-NESTED-FP-LP: Finished llvm::Function pass manager run -; CHECK-NESTED-FP-LP: Finished llvm::Module pass manager run ; RUN: opt -disable-output -debug-pass-manager -debug-pass-manager-verbose \ ; RUN: -passes='module(no-op-function,no-op-loop,no-op-cgscc,cgscc(no-op-function,no-op-loop),function(no-op-loop))' %s 2>&1 \ -; RUN: | FileCheck %s --check-prefix=CHECK-ADAPTORS -; CHECK-ADAPTORS: Starting llvm::Module pass manager run -; CHECK-ADAPTORS: Running pass: ModuleToFunctionPassAdaptor -; CHECK-ADAPTORS: Running pass: NoOpFunctionPass -; CHECK-ADAPTORS: Running pass: ModuleToFunctionPassAdaptor -; CHECK-ADAPTORS: Running pass: FunctionToLoopPassAdaptor -; CHECK-ADAPTORS: Running pass: NoOpLoopPass on Loop at depth 1 containing: %loop -; CHECK-ADAPTORS: Running pass: ModuleToPostOrderCGSCCPassAdaptor -; CHECK-ADAPTORS: Running pass: NoOpCGSCCPass -; CHECK-ADAPTORS: Running pass: ModuleToPostOrderCGSCCPassAdaptor -; CHECK-ADAPTORS: Starting CGSCC pass manager run -; CHECK-ADAPTORS: Running pass: CGSCCToFunctionPassAdaptor -; CHECK-ADAPTORS: Running pass: NoOpFunctionPass -; CHECK-ADAPTORS: Running pass: CGSCCToFunctionPassAdaptor -; CHECK-ADAPTORS: Running pass: FunctionToLoopPassAdaptor -; CHECK-ADAPTORS: Running pass: NoOpLoopPass on Loop at depth 1 containing: %loop -; CHECK-ADAPTORS: Finished CGSCC pass manager run -; CHECK-ADAPTORS: Running pass: ModuleToFunctionPassAdaptor -; CHECK-ADAPTORS: Starting llvm::Function pass manager run -; CHECK-ADAPTORS: Running pass: FunctionToLoopPassAdaptor -; CHECK-ADAPTORS: Running pass: NoOpLoopPass on Loop at depth 1 containing: %loop -; CHECK-ADAPTORS: Finished llvm::Function pass manager run -; CHECK-ADAPTORS: Finished llvm::Module pass manager run +; RUN: | FileCheck %s --check-prefix=CHECK-VERBOSE +; CHECK-VERBOSE: Running pass: ModuleToFunctionPassAdaptor +; CHECK-VERBOSE: Running pass: NoOpFunctionPass +; CHECK-VERBOSE: Running pass: ModuleToFunctionPassAdaptor +; CHECK-VERBOSE: Running pass: FunctionToLoopPassAdaptor +; CHECK-VERBOSE: Running pass: NoOpLoopPass on Loop at depth 1 containing: %loop +; CHECK-VERBOSE: Running pass: ModuleToPostOrderCGSCCPassAdaptor +; CHECK-VERBOSE: Running pass: NoOpCGSCCPass +; CHECK-VERBOSE: Running pass: ModuleToPostOrderCGSCCPassAdaptor +; CHECK-VERBOSE: Running pass: PassManager{{.*}}SCC +; CHECK-VERBOSE: Running pass: CGSCCToFunctionPassAdaptor +; CHECK-VERBOSE: Running pass: NoOpFunctionPass +; CHECK-VERBOSE: Running pass: CGSCCToFunctionPassAdaptor +; CHECK-VERBOSE: Running pass: FunctionToLoopPassAdaptor +; CHECK-VERBOSE: Running pass: NoOpLoopPass on Loop at depth 1 containing: %loop +; CHECK-VERBOSE: Running pass: ModuleToFunctionPassAdaptor +; CHECK-VERBOSE: Running pass: PassManager{{.*}}Function +; CHECK-VERBOSE: Running pass: FunctionToLoopPassAdaptor +; CHECK-VERBOSE: Running pass: NoOpLoopPass on Loop at depth 1 containing: %loop ; RUN: opt -disable-output -debug-pass-manager \ ; RUN: -passes='cgscc(print)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-PRINT-IN-CGSCC -; CHECK-PRINT-IN-CGSCC: Starting llvm::Module pass manager run -; CHECK-PRINT-IN-CGSCC: Starting CGSCC pass manager run ; CHECK-PRINT-IN-CGSCC: Running pass: PrintFunctionPass -; CHECK-PRINT-IN-CGSCC: Finished CGSCC pass manager run ; CHECK-PRINT-IN-CGSCC: Running pass: VerifierPass -; CHECK-PRINT-IN-CGSCC: Finished llvm::Module pass manager run ; RUN: not opt -disable-output -debug-pass-manager \ ; RUN: -passes='function(no-op-function)function(no-op-function)' %s 2>&1 \ diff --git a/llvm/test/Transforms/Inline/cgscc-incremental-invalidate.ll b/llvm/test/Transforms/Inline/cgscc-incremental-invalidate.ll --- a/llvm/test/Transforms/Inline/cgscc-incremental-invalidate.ll +++ b/llvm/test/Transforms/Inline/cgscc-incremental-invalidate.ll @@ -6,7 +6,6 @@ ; First we check that the passes run in the way we expect. Otherwise this test ; may stop testing anything. ; -; CHECK-LABEL: Starting llvm::Module pass manager run. ; CHECK: Running pass: InlinerPass on (test1_f, test1_g, test1_h) ; CHECK: Running analysis: DominatorTreeAnalysis on test1_f ; CHECK: Running analysis: DominatorTreeAnalysis on test1_g @@ -23,15 +22,11 @@ ; CHECK: Invalidating analysis: BranchProbabilityAnalysis on test1_h ; CHECK: Invalidating analysis: BlockFrequencyAnalysis on test1_h ; CHECK-NOT: Invalidating analysis: -; CHECK: Starting llvm::Function pass manager run. -; CHECK-NEXT: Running pass: DominatorTreeVerifierPass on test1_g +; CHECK: Running pass: DominatorTreeVerifierPass on test1_g ; CHECK-NEXT: Running analysis: DominatorTreeAnalysis on test1_g -; CHECK-NEXT: Finished llvm::Function pass manager run. ; CHECK-NOT: Invalidating analysis: -; CHECK: Starting llvm::Function pass manager run. -; CHECK-NEXT: Running pass: DominatorTreeVerifierPass on test1_h +; CHECK: Running pass: DominatorTreeVerifierPass on test1_h ; CHECK-NEXT: Running analysis: DominatorTreeAnalysis on test1_h -; CHECK-NEXT: Finished llvm::Function pass manager run. ; CHECK-NOT: Invalidating analysis: ; CHECK: Running pass: DominatorTreeVerifierPass on test1_f ; CHECK-NEXT: Running analysis: DominatorTreeAnalysis on test1_f diff --git a/llvm/test/Transforms/Inline/clear-analyses.ll b/llvm/test/Transforms/Inline/clear-analyses.ll --- a/llvm/test/Transforms/Inline/clear-analyses.ll +++ b/llvm/test/Transforms/Inline/clear-analyses.ll @@ -7,7 +7,6 @@ ; RUN: -passes='cgscc(inline,function(correlated-propagation))' \ ; RUN: | FileCheck %s ; -; CHECK-LABEL: Starting llvm::Module pass manager run. ; CHECK: Running pass: InlinerPass on (callee) ; CHECK: Running pass: CorrelatedValuePropagationPass on callee ; CHECK: Running analysis: LazyValueAnalysis diff --git a/llvm/test/Transforms/LoopRotate/pr35210.ll b/llvm/test/Transforms/LoopRotate/pr35210.ll --- a/llvm/test/Transforms/LoopRotate/pr35210.ll +++ b/llvm/test/Transforms/LoopRotate/pr35210.ll @@ -5,54 +5,42 @@ ; This test is to make sure we invalidate the post dominator pass after loop rotate simplifies the loop latch. ; The adce passes are here to make sure post dominator analysis is required. -; CHECK: Starting llvm::Function pass manager run. -; CHECK-NEXT: Running pass: ADCEPass on f +; CHECK: Running pass: ADCEPass on f ; CHECK-NEXT: Running analysis: PostDominatorTreeAnalysis on f -; CHECK-NEXT: Starting llvm::Function pass manager run. ; CHECK-NEXT: Running pass: LoopSimplifyPass on f ; CHECK-NEXT: Running analysis: LoopAnalysis on f ; CHECK-NEXT: Running analysis: DominatorTreeAnalysis on f ; CHECK-NEXT: Running analysis: AssumptionAnalysis on f ; CHECK-NEXT: Running pass: LCSSAPass on f -; CHECK-NEXT: Finished llvm::Function pass manager run. ; CHECK-NEXT: Running analysis: AAManager on f ; CHECK-NEXT: Running analysis: TargetLibraryAnalysis on f ; CHECK-NEXT: Running analysis: ScalarEvolutionAnalysis on f ; CHECK-NEXT: Running analysis: TargetIRAnalysis on f ; CHECK-NEXT: Running analysis: InnerAnalysisManagerProxy{{.*}} on f -; CHECK-NEXT: Starting Loop pass manager run. ; CHECK-NEXT: Running pass: LoopRotatePass on Loop at depth 1 containing: %bb
,%bb4 ; CHECK-NEXT: Folding loop latch bb4 into bb -; CHECK-NEXT: Finished Loop pass manager run. ; CHECK-NEXT: Invalidating analysis: PostDominatorTreeAnalysis on f ; CHECK-NEXT: Running pass: ADCEPass on f ; CHECK-NEXT: Running analysis: PostDominatorTreeAnalysis on f -; CHECK-NEXT: Finished llvm::Function pass manager run. -; MSSA: Starting llvm::Function pass manager run. -; MSSA-NEXT: Running pass: ADCEPass on f +; MSSA: Running pass: ADCEPass on f ; MSSA-NEXT: Running analysis: PostDominatorTreeAnalysis on f -; MSSA-NEXT: Starting llvm::Function pass manager run. ; MSSA-NEXT: Running pass: LoopSimplifyPass on f ; MSSA-NEXT: Running analysis: LoopAnalysis on f ; MSSA-NEXT: Running analysis: DominatorTreeAnalysis on f ; MSSA-NEXT: Running analysis: AssumptionAnalysis on f ; MSSA-NEXT: Running pass: LCSSAPass on f -; MSSA-NEXT: Finished llvm::Function pass manager run. ; MSSA-NEXT: Running analysis: MemorySSAAnalysis on f ; MSSA-NEXT: Running analysis: AAManager on f ; MSSA-NEXT: Running analysis: TargetLibraryAnalysis on f ; MSSA-NEXT: Running analysis: ScalarEvolutionAnalysis on f ; MSSA-NEXT: Running analysis: TargetIRAnalysis on f ; MSSA-NEXT: Running analysis: InnerAnalysisManagerProxy{{.*}} on f -; MSSA-NEXT: Starting Loop pass manager run. ; MSSA-NEXT: Running pass: LoopRotatePass on Loop at depth 1 containing: %bb
,%bb4 ; MSSA-NEXT: Folding loop latch bb4 into bb -; MSSA-NEXT: Finished Loop pass manager run. ; MSSA-NEXT: Invalidating analysis: PostDominatorTreeAnalysis on f ; MSSA-NEXT: Running pass: ADCEPass on f ; MSSA-NEXT: Running analysis: PostDominatorTreeAnalysis on f -; MSSA-NEXT: Finished llvm::Function pass manager run. ; CHECK-LABEL: define i8 @f() { ; CHECK-NEXT: entry: diff --git a/llvm/test/Transforms/LoopUnroll/unroll-loop-invalidation.ll b/llvm/test/Transforms/LoopUnroll/unroll-loop-invalidation.ll --- a/llvm/test/Transforms/LoopUnroll/unroll-loop-invalidation.ll +++ b/llvm/test/Transforms/LoopUnroll/unroll-loop-invalidation.ll @@ -5,38 +5,27 @@ ; ; RUN: opt -S -passes='loop(require),loop-unroll,loop(print-access-info)' -debug-pass-manager < %s 2>&1 | FileCheck %s ; -; CHECK: Starting llvm::Function pass manager run. ; CHECK: Running analysis: LoopAnalysis ; CHECK: Running analysis: InnerAnalysisManagerProxy< -; CHECK: Starting Loop pass manager run. ; CHECK: Running pass: RequireAnalysisPass<{{.*}}LoopAccessAnalysis ; CHECK: Running analysis: LoopAccessAnalysis on Loop at depth 2 containing: %inner1.header -; CHECK: Finished Loop pass manager run. -; CHECK: Starting Loop pass manager run. ; CHECK: Running pass: RequireAnalysisPass<{{.*}}LoopAccessAnalysis ; CHECK: Running analysis: LoopAccessAnalysis on Loop at depth 2 containing: %inner2.header -; CHECK: Finished Loop pass manager run. -; CHECK: Starting Loop pass manager run. ; CHECK: Running pass: RequireAnalysisPass<{{.*}}LoopAccessAnalysis ; CHECK: Running analysis: LoopAccessAnalysis on Loop at depth 1 containing: %outer.header -; CHECK: Finished Loop pass manager run. ; CHECK: Running pass: LoopUnrollPass ; CHECK: Clearing all analysis results for: inner2.header ; CHECK: Clearing all analysis results for: outer.header ; CHECK: Invalidating analysis: LoopAccessAnalysis on inner1.header ; CHECK-NOT: Invalidating analysis: LoopAccessAnalysis on inner1.header.1 -; CHECK: Starting Loop pass manager run. ; CHECK: Running pass: LoopAccessInfoPrinterPass ; CHECK: Running analysis: LoopAccessAnalysis on Loop at depth 1 containing: %inner1.header ; CHECK: Loop access info in function 'test': ; CHECK: inner1.header: -; CHECK: Finished Loop pass manager run. -; CHECK: Starting Loop pass manager run. ; CHECK: Running pass: LoopAccessInfoPrinterPass ; CHECK: Running analysis: LoopAccessAnalysis on Loop at depth 1 containing: %inner1.header.1 ; CHECK: Loop access info in function 'test': ; CHECK: inner1.header.1: -; CHECK: Finished Loop pass manager run. target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/Transforms/SCCP/ipsccp-preserve-analysis.ll b/llvm/test/Transforms/SCCP/ipsccp-preserve-analysis.ll --- a/llvm/test/Transforms/SCCP/ipsccp-preserve-analysis.ll +++ b/llvm/test/Transforms/SCCP/ipsccp-preserve-analysis.ll @@ -8,7 +8,6 @@ ; RUN: opt -passes='function(require),ipsccp,function(verify)' -S %s | FileCheck -check-prefixes='IR' %s -; NEW-PM: Starting llvm::Module pass manager run. ; NEW-PM: Running analysis: DominatorTreeAnalysis on f1 ; NEW-PM: Running analysis: PostDominatorTreeAnalysis on f1 ; NEW-PM: Running analysis: DominatorTreeAnalysis on f2 diff --git a/llvm/test/Transforms/SCCP/preserve-analysis.ll b/llvm/test/Transforms/SCCP/preserve-analysis.ll --- a/llvm/test/Transforms/SCCP/preserve-analysis.ll +++ b/llvm/test/Transforms/SCCP/preserve-analysis.ll @@ -25,7 +25,6 @@ ; NEW-PM-NOT: Running analysis: AssumptionAnalysis on test ; NEW-PM-NOT: Running analysis: TargetLibraryAnalysis on test ; NEW-PM-NOT: Running analysis: TargetIRAnalysis on test -; NEW-PM: Finished llvm::Function pass manager run. define i32 @test() { diff --git a/llvm/test/Transforms/SROA/dead-inst.ll b/llvm/test/Transforms/SROA/dead-inst.ll --- a/llvm/test/Transforms/SROA/dead-inst.ll +++ b/llvm/test/Transforms/SROA/dead-inst.ll @@ -8,7 +8,6 @@ ; CHECK: Invalidating analysis: DemandedBitsAnalysis on H ; CHECK: Running pass: BDCEPass on H ; CHECK: Running analysis: DemandedBitsAnalysis on H -; CHECK: Finished llvm::Function pass manager run. target datalayout = "e-m:e-i64:64-n32:64" target triple = "powerpc64le-grtev4-linux-gnu" diff --git a/llvm/test/tools/gold/X86/new-pm.ll b/llvm/test/tools/gold/X86/new-pm.ll --- a/llvm/test/tools/gold/X86/new-pm.ll +++ b/llvm/test/tools/gold/X86/new-pm.ll @@ -8,7 +8,6 @@ ; RUN: --plugin-opt=cache-dir=%t.cache \ ; RUN: -o %t2.o %t.o 2>&1 | FileCheck %s -; CHECK: Starting llvm::Module pass manager run ;; --plugin-opt=debug-pass-manager is a no-op for the legacy pass manager. ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \ diff --git a/llvm/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp b/llvm/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp --- a/llvm/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp +++ b/llvm/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp @@ -136,7 +136,7 @@ // Create pass pipeline // - PassBuilder PB(false, TM.get()); + PassBuilder PB(TM.get()); LoopAnalysisManager LAM; FunctionAnalysisManager FAM; @@ -243,7 +243,7 @@ exit(1); } - PassBuilder PB(false, TM.get()); + PassBuilder PB(TM.get()); ModulePassManager MPM; if (auto Err = PB.parsePassPipeline(MPM, PassPipeline)) { errs() << *argv[0] << ": " << toString(std::move(Err)) << "\n"; diff --git a/llvm/tools/opt/NewPMDriver.cpp b/llvm/tools/opt/NewPMDriver.cpp --- a/llvm/tools/opt/NewPMDriver.cpp +++ b/llvm/tools/opt/NewPMDriver.cpp @@ -293,7 +293,7 @@ // option has been enabled. PTO.LoopUnrolling = !DisableLoopUnrolling; PTO.Coroutines = Coroutines; - PassBuilder PB(DebugPM, TM, PTO, P, &PIC); + PassBuilder PB(TM, PTO, P, &PIC); registerEPCallbacks(PB); // Load requested pass plugins and let them register pass builder callbacks @@ -390,7 +390,7 @@ PB.registerLoopAnalyses(LAM); PB.crossRegisterProxies(LAM, FAM, CGAM, MAM); - ModulePassManager MPM(DebugPM); + ModulePassManager MPM; if (VK > VK_NoVerifier) MPM.addPass(VerifierPass()); if (EnableDebugify) diff --git a/llvm/unittests/Analysis/CGSCCPassManagerTest.cpp b/llvm/unittests/Analysis/CGSCCPassManagerTest.cpp --- a/llvm/unittests/Analysis/CGSCCPassManagerTest.cpp +++ b/llvm/unittests/Analysis/CGSCCPassManagerTest.cpp @@ -284,11 +284,11 @@ int ModuleAnalysisRuns = 0; MAM.registerPass([&] { return TestModuleAnalysis(ModuleAnalysisRuns); }); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(RequireAnalysisPass()); - CGSCCPassManager CGPM1(/*DebugLogging*/ true); - FunctionPassManager FPM1(/*DebugLogging*/ true); + CGSCCPassManager CGPM1; + FunctionPassManager FPM1; int FunctionPassRunCount1 = 0; FPM1.addPass(LambdaFunctionPass([&](Function &, FunctionAnalysisManager &) { ++FunctionPassRunCount1; @@ -341,7 +341,7 @@ return PreservedAnalyses::all(); })); - FunctionPassManager FPM2(/*DebugLogging*/ true); + FunctionPassManager FPM2; int FunctionPassRunCount2 = 0; FPM2.addPass(LambdaFunctionPass([&](Function &, FunctionAnalysisManager &) { ++FunctionPassRunCount2; @@ -351,7 +351,7 @@ MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM1))); - FunctionPassManager FPM3(/*DebugLogging*/ true); + FunctionPassManager FPM3; int FunctionPassRunCount3 = 0; FPM3.addPass(LambdaFunctionPass([&](Function &, FunctionAnalysisManager &) { ++FunctionPassRunCount3; @@ -382,13 +382,13 @@ int ModuleAnalysisRuns = 0; MAM.registerPass([&] { return TestModuleAnalysis(ModuleAnalysisRuns); }); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(RequireAnalysisPass()); // The first CGSCC run we preserve everything and make sure that works and // the module analysis is available in the second CGSCC run from the one // required module pass above. - CGSCCPassManager CGPM1(/*DebugLogging*/ true); + CGSCCPassManager CGPM1; int CountFoundModuleAnalysis1 = 0; CGPM1.addPass(LambdaSCCPass([&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, @@ -404,7 +404,7 @@ // The second CGSCC run checks that the module analysis got preserved the // previous time and in one SCC fails to preserve it. - CGSCCPassManager CGPM2(/*DebugLogging*/ true); + CGSCCPassManager CGPM2; int CountFoundModuleAnalysis2 = 0; CGPM2.addPass( LambdaSCCPass([&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, @@ -424,7 +424,7 @@ // The third CGSCC run should fail to find a cached module analysis as it // should have been invalidated by the above CGSCC run. - CGSCCPassManager CGPM3(/*DebugLogging*/ true); + CGSCCPassManager CGPM3; int CountFoundModuleAnalysis3 = 0; CGPM3.addPass(LambdaSCCPass([&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, @@ -452,13 +452,13 @@ int ModuleAnalysisRuns = 0; MAM.registerPass([&] { return TestModuleAnalysis(ModuleAnalysisRuns); }); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(RequireAnalysisPass()); // The first run we preserve everything and make sure that works and the // module analysis is available in the second run from the one required // module pass above. - FunctionPassManager FPM1(/*DebugLogging*/ true); + FunctionPassManager FPM1; // Start true and mark false if we ever failed to find a module analysis // because we expect this to succeed for each SCC. bool FoundModuleAnalysis1 = true; @@ -470,13 +470,13 @@ return PreservedAnalyses::all(); })); - CGSCCPassManager CGPM1(/*DebugLogging*/ true); + CGSCCPassManager CGPM1; CGPM1.addPass(createCGSCCToFunctionPassAdaptor(std::move(FPM1))); MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM1))); // The second run checks that the module analysis got preserved the previous // time and in one function fails to preserve it. - FunctionPassManager FPM2(/*DebugLogging*/ true); + FunctionPassManager FPM2; // Again, start true and mark false if we ever failed to find a module analysis // because we expect this to succeed for each SCC. bool FoundModuleAnalysis2 = true; @@ -491,13 +491,13 @@ return F.getName() == "h2" ? PreservedAnalyses::none() : PreservedAnalyses::all(); })); - CGSCCPassManager CGPM2(/*DebugLogging*/ true); + CGSCCPassManager CGPM2; CGPM2.addPass(createCGSCCToFunctionPassAdaptor(std::move(FPM2))); MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM2))); // The third run should fail to find a cached module analysis as it should // have been invalidated by the above run. - FunctionPassManager FPM3(/*DebugLogging*/ true); + FunctionPassManager FPM3; // Start false and mark true if we ever *succeeded* to find a module // analysis, as we expect this to fail for every function. bool FoundModuleAnalysis3 = false; @@ -509,7 +509,7 @@ return PreservedAnalyses::none(); })); - CGSCCPassManager CGPM3(/*DebugLogging*/ true); + CGSCCPassManager CGPM3; CGPM3.addPass(createCGSCCToFunctionPassAdaptor(std::move(FPM3))); MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM3))); @@ -527,10 +527,10 @@ int SCCAnalysisRuns = 0; CGAM.registerPass([&] { return TestSCCAnalysis(SCCAnalysisRuns); }); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; // First force the analysis to be run. - CGSCCPassManager CGPM1(/*DebugLogging*/ true); + CGSCCPassManager CGPM1; CGPM1.addPass(RequireAnalysisPass()); @@ -548,7 +548,7 @@ // And now a second CGSCC run which requires the SCC analysis again. This // will trigger re-running it. - CGSCCPassManager CGPM2(/*DebugLogging*/ true); + CGSCCPassManager CGPM2; CGPM2.addPass(RequireAnalysisPass()); @@ -565,10 +565,10 @@ int SCCAnalysisRuns = 0; CGAM.registerPass([&] { return TestSCCAnalysis(SCCAnalysisRuns); }); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; // First force the analysis to be run. - CGSCCPassManager CGPM1(/*DebugLogging*/ true); + CGSCCPassManager CGPM1; CGPM1.addPass(RequireAnalysisPass()); @@ -587,7 +587,7 @@ // And now a second CGSCC run which requires the SCC analysis again but find // it in the cache. - CGSCCPassManager CGPM2(/*DebugLogging*/ true); + CGSCCPassManager CGPM2; CGPM2.addPass(RequireAnalysisPass()); @@ -604,10 +604,10 @@ int SCCAnalysisRuns = 0; CGAM.registerPass([&] { return TestSCCAnalysis(SCCAnalysisRuns); }); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; // First force the analysis to be run. - CGSCCPassManager CGPM1(/*DebugLogging*/ true); + CGSCCPassManager CGPM1; CGPM1.addPass(RequireAnalysisPass()); @@ -622,7 +622,7 @@ })); // And now a second CGSCC run which requires the SCC analysis again. - CGSCCPassManager CGPM2(/*DebugLogging*/ true); + CGSCCPassManager CGPM2; CGPM2.addPass(RequireAnalysisPass()); @@ -650,10 +650,10 @@ " ret void\n" "}\n"); - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; // First force the analysis to be run. - FunctionPassManager FPM1(/*DebugLogging*/ true); + FunctionPassManager FPM1; FPM1.addPass(RequireAnalysisPass()); CGPM.addPass(createCGSCCToFunctionPassAdaptor(std::move(FPM1))); @@ -668,11 +668,11 @@ // And now a second CGSCC run which requires the SCC analysis again. This // will trigger re-running it. - FunctionPassManager FPM2(/*DebugLogging*/ true); + FunctionPassManager FPM2; FPM2.addPass(RequireAnalysisPass()); CGPM.addPass(createCGSCCToFunctionPassAdaptor(std::move(FPM2))); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); EXPECT_EQ(2, FunctionAnalysisRuns); @@ -695,10 +695,10 @@ " ret void\n" "}\n"); - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; // First force the analysis to be run. - FunctionPassManager FPM1(/*DebugLogging*/ true); + FunctionPassManager FPM1; FPM1.addPass(RequireAnalysisPass()); CGPM.addPass(createCGSCCToFunctionPassAdaptor(std::move(FPM1))); @@ -716,11 +716,11 @@ // And now a second CGSCC run which requires the SCC analysis again but find // it in the cache. - FunctionPassManager FPM2(/*DebugLogging*/ true); + FunctionPassManager FPM2; FPM2.addPass(RequireAnalysisPass()); CGPM.addPass(createCGSCCToFunctionPassAdaptor(std::move(FPM2))); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); EXPECT_EQ(1, FunctionAnalysisRuns); @@ -740,12 +740,12 @@ int FunctionAnalysisRuns = 0; FAM.registerPass([&] { return TestFunctionAnalysis(FunctionAnalysisRuns); }); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; // First force the analysis to be run. - FunctionPassManager FPM1(/*DebugLogging*/ true); + FunctionPassManager FPM1; FPM1.addPass(RequireAnalysisPass()); - CGSCCPassManager CGPM1(/*DebugLogging*/ true); + CGSCCPassManager CGPM1; CGPM1.addPass(createCGSCCToFunctionPassAdaptor(std::move(FPM1))); MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM1))); @@ -762,9 +762,9 @@ // And now a second CGSCC run which requires the SCC analysis again. This // will trigger re-running it. - FunctionPassManager FPM2(/*DebugLogging*/ true); + FunctionPassManager FPM2; FPM2.addPass(RequireAnalysisPass()); - CGSCCPassManager CGPM2(/*DebugLogging*/ true); + CGSCCPassManager CGPM2; CGPM2.addPass(createCGSCCToFunctionPassAdaptor(std::move(FPM2))); MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM2))); @@ -782,12 +782,12 @@ int FunctionAnalysisRuns = 0; FAM.registerPass([&] { return TestFunctionAnalysis(FunctionAnalysisRuns); }); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; // First force the analysis to be run. - FunctionPassManager FPM1(/*DebugLogging*/ true); + FunctionPassManager FPM1; FPM1.addPass(RequireAnalysisPass()); - CGSCCPassManager CGPM1(/*DebugLogging*/ true); + CGSCCPassManager CGPM1; CGPM1.addPass(createCGSCCToFunctionPassAdaptor(std::move(FPM1))); MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM1))); @@ -805,9 +805,9 @@ // And now a second CGSCC run which requires the SCC analysis again. This // will trigger re-running it. - FunctionPassManager FPM2(/*DebugLogging*/ true); + FunctionPassManager FPM2; FPM2.addPass(RequireAnalysisPass()); - CGSCCPassManager CGPM2(/*DebugLogging*/ true); + CGSCCPassManager CGPM2; CGPM2.addPass(createCGSCCToFunctionPassAdaptor(std::move(FPM2))); MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM2))); @@ -825,12 +825,12 @@ int FunctionAnalysisRuns = 0; FAM.registerPass([&] { return TestFunctionAnalysis(FunctionAnalysisRuns); }); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; // First force the analysis to be run. - FunctionPassManager FPM1(/*DebugLogging*/ true); + FunctionPassManager FPM1; FPM1.addPass(RequireAnalysisPass()); - CGSCCPassManager CGPM1(/*DebugLogging*/ true); + CGSCCPassManager CGPM1; CGPM1.addPass(createCGSCCToFunctionPassAdaptor(std::move(FPM1))); MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM1))); @@ -843,9 +843,9 @@ // And now a second CGSCC run which requires the SCC analysis again. This // will trigger re-running it. - FunctionPassManager FPM2(/*DebugLogging*/ true); + FunctionPassManager FPM2; FPM2.addPass(RequireAnalysisPass()); - CGSCCPassManager CGPM2(/*DebugLogging*/ true); + CGSCCPassManager CGPM2; CGPM2.addPass(createCGSCCToFunctionPassAdaptor(std::move(FPM2))); MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM2))); @@ -1043,10 +1043,10 @@ CGAM); }); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; int FunctionCount = 0; - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; // First just use the analysis to get the function count and preserve // everything. CGPM.addPass( @@ -1099,7 +1099,7 @@ // invalidation to occur, which will force yet another invalidation of the // indirect SCC-level analysis as the module analysis it depends on gets // invalidated. - CGSCCPassManager CGPM2(/*DebugLogging*/ true); + CGSCCPassManager CGPM2; CGPM2.addPass( LambdaSCCPass([&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &) { @@ -1162,9 +1162,9 @@ CGAM); }); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; // First just use the analysis to get the function count and preserve // everything. using RequireTestIndirectFunctionAnalysisPass = @@ -1221,7 +1221,7 @@ RequireTestIndirectFunctionAnalysisPass())); // Create another CGSCC pipeline that requires all the analyses again. - CGSCCPassManager CGPM2(/*DebugLogging*/ true); + CGSCCPassManager CGPM2; CGPM2.addPass(RequireTestDoublyIndirectSCCAnalysisPass()); CGPM2.addPass(createCGSCCToFunctionPassAdaptor( RequireTestIndirectFunctionAnalysisPass())); @@ -1229,7 +1229,7 @@ // Next we inject an SCC pass that finds the `(h2)` SCC, adds a call to `h3` // back to `h2`, and then invalidates everything for what will then be the // `(h3, h1, h2)` SCC again. - CGSCCPassManager CGPM3(/*DebugLogging*/ true); + CGSCCPassManager CGPM3; CGPM3.addPass( LambdaSCCPass([&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR) { @@ -1270,7 +1270,7 @@ // invalidation to occur, which will force yet another invalidation of the // indirect SCC-level analysis as the module analysis it depends on gets // invalidated. - CGSCCPassManager CGPM4(/*DebugLogging*/ true); + CGSCCPassManager CGPM4; CGPM4.addPass(RequireTestDoublyIndirectSCCAnalysisPass()); CGPM4.addPass(createCGSCCToFunctionPassAdaptor( RequireTestIndirectFunctionAnalysisPass())); @@ -1339,7 +1339,7 @@ }; TEST_F(CGSCCPassManagerTest, TestUpdateCGAndAnalysisManagerForPasses0) { - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; CGPM.addPass(LambdaSCCPassNoPreserve( [&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR) { @@ -1369,13 +1369,13 @@ updateCGAndAnalysisManagerForCGSCCPass(CG, C, H2N, AM, UR, FAM)); })); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); } TEST_F(CGSCCPassManagerTest, TestUpdateCGAndAnalysisManagerForPasses1) { - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; CGPM.addPass(LambdaSCCPassNoPreserve([&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, @@ -1407,13 +1407,13 @@ "Any new calls should be modeled as"); })); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); } TEST_F(CGSCCPassManagerTest, TestUpdateCGAndAnalysisManagerForPasses2) { - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; CGPM.addPass(LambdaSCCPassNoPreserve( [&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR) { @@ -1437,13 +1437,13 @@ updateCGAndAnalysisManagerForCGSCCPass(CG, C, FN, AM, UR, FAM)); })); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); } TEST_F(CGSCCPassManagerTest, TestUpdateCGAndAnalysisManagerForPasses3) { - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; CGPM.addPass(LambdaSCCPassNoPreserve([&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, @@ -1469,13 +1469,13 @@ "Any new calls should be modeled as"); })); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); } TEST_F(CGSCCPassManagerTest, TestUpdateCGAndAnalysisManagerForPasses4) { - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; CGPM.addPass(LambdaSCCPassNoPreserve( [&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR) { @@ -1507,13 +1507,13 @@ updateCGAndAnalysisManagerForCGSCCPass(CG, C, FN, AM, UR, FAM)); })); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); } TEST_F(CGSCCPassManagerTest, TestUpdateCGAndAnalysisManagerForPasses5) { - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; CGPM.addPass(LambdaSCCPassNoPreserve([&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, @@ -1545,13 +1545,13 @@ "should already have an associated node"); })); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); } TEST_F(CGSCCPassManagerTest, TestUpdateCGAndAnalysisManagerForPasses6) { - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; CGPM.addPass(LambdaSCCPassNoPreserve( [&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR) { @@ -1580,13 +1580,13 @@ ASSERT_NO_FATAL_FAILURE(CGU.reanalyzeFunction(*FnH2)); })); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); } TEST_F(CGSCCPassManagerTest, TestUpdateCGAndAnalysisManagerForPasses7) { - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; CGPM.addPass(LambdaSCCPassNoPreserve( [&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR) { @@ -1609,13 +1609,13 @@ ASSERT_NO_FATAL_FAILURE(CGU.reanalyzeFunction(*FnF)); })); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); } TEST_F(CGSCCPassManagerTest, TestUpdateCGAndAnalysisManagerForPasses8) { - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; CGPM.addPass(LambdaSCCPassNoPreserve( [&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR) { @@ -1643,13 +1643,13 @@ ASSERT_EQ(FnF->getNumUses(), 0U); })); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); } TEST_F(CGSCCPassManagerTest, TestUpdateCGAndAnalysisManagerForPasses9) { - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; CGPM.addPass(LambdaSCCPassNoPreserve( [&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR) { @@ -1668,13 +1668,13 @@ ASSERT_EQ(M->getFunctionList().size(), 5U); })); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); } TEST_F(CGSCCPassManagerTest, TestUpdateCGAndAnalysisManagerForPasses10) { - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; CGPM.addPass(LambdaSCCPassNoPreserve( [&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR) { @@ -1707,7 +1707,7 @@ ASSERT_NO_FATAL_FAILURE(CGU.removeFunction(*FnH2)); })); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); } @@ -1732,7 +1732,7 @@ bool Ran = false; - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; CGPM.addPass(LambdaSCCPassNoPreserve( [&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR) { @@ -1784,7 +1784,7 @@ } })); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); ASSERT_TRUE(Ran); @@ -1799,7 +1799,7 @@ bool Ran = false; - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; CGPM.addPass(LambdaSCCPassNoPreserve([&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, @@ -1871,7 +1871,7 @@ } })); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); ASSERT_TRUE(Ran); @@ -1904,7 +1904,7 @@ "}\n"); bool Ran = false; - CGSCCPassManager CGPM(/*DebugLogging*/ true); + CGSCCPassManager CGPM; CGPM.addPass(LambdaSCCPassNoPreserve([&](LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, @@ -1935,7 +1935,7 @@ } })); - ModulePassManager MPM(/*DebugLogging*/ true); + ModulePassManager MPM; MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); MPM.run(*M, MAM); diff --git a/llvm/unittests/IR/PassBuilderCallbacksTest.cpp b/llvm/unittests/IR/PassBuilderCallbacksTest.cpp --- a/llvm/unittests/IR/PassBuilderCallbacksTest.cpp +++ b/llvm/unittests/IR/PassBuilderCallbacksTest.cpp @@ -465,9 +465,9 @@ "exit:\n" " ret void\n" "}\n")), - CallbacksHandle(), PB(false, nullptr, PipelineTuningOptions(), None, - &CallbacksHandle.Callbacks), - PM(true), LAM(true), FAM(true), CGAM(true), AM(true) { + CallbacksHandle(), + PB(nullptr, PipelineTuningOptions(), None, &CallbacksHandle.Callbacks), + PM(), LAM(true), FAM(true), CGAM(true), AM(true) { EXPECT_TRUE(&CallbacksHandle.Callbacks == PB.getPassInstrumentationCallbacks()); @@ -1278,8 +1278,7 @@ TEST_F(ModuleCallbacksTest, ParseTopLevelPipeline) { PB.registerParseTopLevelPipelineCallback( [this](ModulePassManager &MPM, - ArrayRef Pipeline, - bool DebugLogging) { + ArrayRef Pipeline) { auto &FirstName = Pipeline.front().Name; auto &InnerPipeline = Pipeline.front().InnerPipeline; if (FirstName == "another-pipeline") { diff --git a/llvm/unittests/IR/PassManagerTest.cpp b/llvm/unittests/IR/PassManagerTest.cpp --- a/llvm/unittests/IR/PassManagerTest.cpp +++ b/llvm/unittests/IR/PassManagerTest.cpp @@ -440,11 +440,11 @@ int AnalyzedFunctionCount1 = 0; { // Pointless scoped copy to test move assignment. - ModulePassManager NestedMPM(/*DebugLogging*/ true); + ModulePassManager NestedMPM; FunctionPassManager FPM; { // Pointless scope to test move assignment. - FunctionPassManager NestedFPM(/*DebugLogging*/ true); + FunctionPassManager NestedFPM; NestedFPM.addPass(TestFunctionPass(FunctionPassRunCount1, AnalyzedInstrCount1, AnalyzedFunctionCount1, MAM)); @@ -463,7 +463,7 @@ int AnalyzedInstrCount2 = 0; int AnalyzedFunctionCount2 = 0; { - FunctionPassManager FPM(/*DebugLogging*/ true); + FunctionPassManager FPM; FPM.addPass(TestFunctionPass(FunctionPassRunCount2, AnalyzedInstrCount2, AnalyzedFunctionCount2, MAM)); MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); @@ -476,7 +476,7 @@ int AnalyzedInstrCount3 = 0; int AnalyzedFunctionCount3 = 0; { - FunctionPassManager FPM(/*DebugLogging*/ true); + FunctionPassManager FPM; FPM.addPass(TestFunctionPass(FunctionPassRunCount3, AnalyzedInstrCount3, AnalyzedFunctionCount3, MAM)); FPM.addPass(TestInvalidationFunctionPass("f")); @@ -502,7 +502,7 @@ int AnalyzedInstrCount5 = 0; int AnalyzedFunctionCount5 = 0; { - FunctionPassManager FPM(/*DebugLogging*/ true); + FunctionPassManager FPM; FPM.addPass(TestInvalidationFunctionPass("f")); FPM.addPass(TestFunctionPass(FunctionPassRunCount5, AnalyzedInstrCount5, AnalyzedFunctionCount5, MAM, @@ -724,8 +724,8 @@ FAM.registerPass([&] { return PassInstrumentationAnalysis(&PIC); }); int InstrCount = 0, FunctionCount = 0; - ModulePassManager MPM(/*DebugLogging*/ true); - FunctionPassManager FPM(/*DebugLogging*/ true); + ModulePassManager MPM; + FunctionPassManager FPM; // First just use the analysis to get the instruction count, and preserve // everything. FPM.addPass(LambdaPass([&](Function &F, FunctionAnalysisManager &AM) { @@ -768,7 +768,7 @@ // invalidation to occur, which will force yet another invalidation of the // indirect function-level analysis as the module analysis it depends on gets // invalidated. - FunctionPassManager FPM2(/*DebugLogging*/ true); + FunctionPassManager FPM2; FPM2.addPass(LambdaPass([&](Function &F, FunctionAnalysisManager &AM) { auto &DoublyIndirectResult = AM.getResult(F); @@ -824,7 +824,7 @@ auto *F = M->getFunction("foo"); FunctionAnalysisManager FAM(/*DebugLogging*/ true); - FunctionPassManager FPM(/*DebugLogging*/ true); + FunctionPassManager FPM; PassInstrumentationCallbacks PIC; StandardInstrumentations SI(/*DebugLogging*/ true); SI.registerCallbacks(PIC, &FAM); @@ -870,7 +870,7 @@ auto *F = M->getFunction("foo"); FunctionAnalysisManager FAM(/*DebugLogging*/ true); - FunctionPassManager FPM(/*DebugLogging*/ true); + FunctionPassManager FPM; PassInstrumentationCallbacks PIC; StandardInstrumentations SI(/*DebugLogging*/ true); SI.registerCallbacks(PIC, &FAM); @@ -935,7 +935,7 @@ auto *F = M->getFunction("foo"); FunctionAnalysisManager FAM(/*DebugLogging*/ true); - FunctionPassManager FPM(/*DebugLogging*/ true); + FunctionPassManager FPM; PassInstrumentationCallbacks PIC; StandardInstrumentations SI(/*DebugLogging*/ true); SI.registerCallbacks(PIC, &FAM); @@ -944,7 +944,7 @@ FAM.registerPass([&] { return AssumptionAnalysis(); }); FAM.registerPass([&] { return TargetIRAnalysis(); }); - FunctionPassManager InnerFPM(/*DebugLogging*/ true); + FunctionPassManager InnerFPM; InnerFPM.addPass(SimplifyCFGPass()); FPM.addPass(TestSimplifyCFGWrapperPass(InnerFPM)); diff --git a/llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp b/llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp --- a/llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp +++ b/llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp @@ -330,7 +330,7 @@ }; TEST_F(LoopPassManagerTest, Basic) { - ModulePassManager MPM(true); + ModulePassManager MPM; ::testing::InSequence MakeExpectationsSequenced; // First we just visit all the loops in all the functions and get their @@ -350,9 +350,9 @@ EXPECT_CALL(MLAHandle, run(HasName("loop.g.0"), _, _)); // Wire the loop pass through pass managers into the module pipeline. { - LoopPassManager LPM(true); + LoopPassManager LPM; LPM.addPass(MLPHandle.getPass()); - FunctionPassManager FPM(true); + FunctionPassManager FPM; FPM.addPass(createFunctionToLoopPassAdaptor(std::move(LPM))); MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); } @@ -376,10 +376,10 @@ .WillOnce(Invoke(getLoopAnalysisResult)); // Wire two loop pass runs into the module pipeline. { - LoopPassManager LPM(true); + LoopPassManager LPM; LPM.addPass(MLPHandle.getPass()); LPM.addPass(MLPHandle.getPass()); - FunctionPassManager FPM(true); + FunctionPassManager FPM; FPM.addPass(createFunctionToLoopPassAdaptor(std::move(LPM))); MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); } @@ -389,8 +389,8 @@ } TEST_F(LoopPassManagerTest, FunctionPassInvalidationOfLoopAnalyses) { - ModulePassManager MPM(true); - FunctionPassManager FPM(true); + ModulePassManager MPM; + FunctionPassManager FPM; // We process each function completely in sequence. ::testing::Sequence FSequence, GSequence; @@ -473,7 +473,7 @@ } TEST_F(LoopPassManagerTest, ModulePassInvalidationOfLoopAnalyses) { - ModulePassManager MPM(true); + ModulePassManager MPM; ::testing::InSequence MakeExpectationsSequenced; // First, force the analysis result to be computed for each loop. @@ -564,8 +564,8 @@ // become invalid, the analysis proxy itself becomes invalid and we clear all // loop analysis results. TEST_F(LoopPassManagerTest, InvalidationOfBundledAnalyses) { - ModulePassManager MPM(true); - FunctionPassManager FPM(true); + ModulePassManager MPM; + FunctionPassManager FPM; ::testing::InSequence MakeExpectationsSequenced; // First, force the analysis result to be computed for each loop. @@ -772,11 +772,11 @@ })); // Build the pipeline and run it. - ModulePassManager MPM(true); - FunctionPassManager FPM(true); + ModulePassManager MPM; + FunctionPassManager FPM; FPM.addPass( createFunctionToLoopPassAdaptor(RequireAnalysisLoopPass())); - LoopPassManager LPM(true); + LoopPassManager LPM; LPM.addPass(MLPHandle.getPass()); LPM.addPass(MLPHandle.getPass()); FPM.addPass(createFunctionToLoopPassAdaptor(std::move(LPM))); @@ -856,8 +856,8 @@ })); // Build the pipeline and run it. - ModulePassManager MPM(true); - FunctionPassManager FPM(true); + ModulePassManager MPM; + FunctionPassManager FPM; FPM.addPass(MFPHandle.getPass()); FPM.addPass( createFunctionToLoopPassAdaptor(RequireAnalysisLoopPass())); @@ -935,9 +935,9 @@ // pass pipeline consisting of three mock pass runs over each loop. After // this we run both domtree and loop verification passes to make sure that // the IR remained valid during our mutations. - ModulePassManager MPM(true); - FunctionPassManager FPM(true); - LoopPassManager LPM(true); + ModulePassManager MPM; + FunctionPassManager FPM; + LoopPassManager LPM; LPM.addPass(MLPHandle.getPass()); LPM.addPass(MLPHandle.getPass()); LPM.addPass(MLPHandle.getPass()); @@ -1138,9 +1138,9 @@ // pass pipeline consisting of three mock pass runs over each loop. After // this we run both domtree and loop verification passes to make sure that // the IR remained valid during our mutations. - ModulePassManager MPM(true); - FunctionPassManager FPM(true); - LoopPassManager LPM(true); + ModulePassManager MPM; + FunctionPassManager FPM; + LoopPassManager LPM; LPM.addPass(MLPHandle.getPass()); LPM.addPass(MLPHandle.getPass()); LPM.addPass(MLPHandle.getPass()); @@ -1422,14 +1422,14 @@ }; // Build up the pass managers. - ModulePassManager MPM(true); - FunctionPassManager FPM(true); + ModulePassManager MPM; + FunctionPassManager FPM; // We run several loop pass pipelines across the loop nest, but they all take // the same form of three mock pass runs in a loop pipeline followed by // domtree and loop verification. We use a lambda to stamp this out each // time. auto AddLoopPipelineAndVerificationPasses = [&] { - LoopPassManager LPM(true); + LoopPassManager LPM; LPM.addPass(MLPHandle.getPass()); LPM.addPass(MLPHandle.getPass()); LPM.addPass(MLPHandle.getPass()); @@ -1636,11 +1636,11 @@ EXPECT_CALL(MLNPHandle, run(HasName("loop.g.0"), _, _, _)) .InSequence(GSequence); - ModulePassManager MPM(true); - FunctionPassManager FPM(true); + ModulePassManager MPM; + FunctionPassManager FPM; { - LoopPassManager LPM(true); + LoopPassManager LPM; LPM.addPass(MLPHandle.getPass()); LPM.addPass(MLNPHandle.getPass()); LPM.addPass(MLPHandle.getPass()); @@ -1658,7 +1658,7 @@ } { - LoopPassManager LPM(true); + LoopPassManager LPM; LPM.addPass(MLNPHandle.getPass()); auto Adaptor = createFunctionToLoopPassAdaptor(MLNPHandle.getPass()); ASSERT_TRUE(Adaptor.isLoopNestMode()); diff --git a/polly/lib/Support/RegisterPasses.cpp b/polly/lib/Support/RegisterPasses.cpp --- a/polly/lib/Support/RegisterPasses.cpp +++ b/polly/lib/Support/RegisterPasses.cpp @@ -734,16 +734,15 @@ static bool parseTopLevelPipeline(ModulePassManager &MPM, PassInstrumentationCallbacks *PIC, - ArrayRef Pipeline, - bool DebugLogging) { + ArrayRef Pipeline) { std::vector FullPipeline; StringRef FirstName = Pipeline.front().Name; if (!isScopPassName(FirstName)) return false; - FunctionPassManager FPM(DebugLogging); - ScopPassManager SPM(DebugLogging); + FunctionPassManager FPM; + ScopPassManager SPM; for (auto &Element : Pipeline) { auto &Name = Element.Name; @@ -773,9 +772,8 @@ }); PB.registerParseTopLevelPipelineCallback( [PIC](ModulePassManager &MPM, - ArrayRef Pipeline, - bool DebugLogging) -> bool { - return parseTopLevelPipeline(MPM, PIC, Pipeline, DebugLogging); + ArrayRef Pipeline) -> bool { + return parseTopLevelPipeline(MPM, PIC, Pipeline); }); if (PassPosition != POSITION_BEFORE_VECTORIZER)