From: Chandler Carruth Date: Tue, 13 Jan 2015 11:13:56 +0000 (+0000) Subject: [PM] Refactor the new pass manager to use a single template to implement X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=816702ffe00a9bf60704d1c992f55203ca39c55c;p=platform%2Fupstream%2Fllvm.git [PM] Refactor the new pass manager to use a single template to implement the generic functionality of the pass managers themselves. In the new infrastructure, the pass "manager" isn't actually interesting at all. It just pipelines a single chunk of IR through N passes. We don't need to know anything about the IR or the passes to do this really and we can replace the 3 implementations of the exact same functionality with a single generic PassManager template, complementing the single generic AnalysisManager template. I've left typedefs in place to give convenient names to the various obvious instantiations of the template. With this, I think I've nuked almost all of the redundant logic in the managers, and I think the overall design is actually simpler for having single templates that clearly indicate there is no special logic here. The logging is made somewhat more annoying by this change, but I don't think the difference is worth having heavy-weight traits to help log things. llvm-svn: 225783 --- diff --git a/llvm/include/llvm/Analysis/CGSCCPassManager.h b/llvm/include/llvm/Analysis/CGSCCPassManager.h index c938a9c..92fbb58 100644 --- a/llvm/include/llvm/Analysis/CGSCCPassManager.h +++ b/llvm/include/llvm/Analysis/CGSCCPassManager.h @@ -26,6 +26,13 @@ namespace llvm { +/// \brief The CGSCC pass manager. +/// +/// See the documentation for the PassManager template for details. It runs +/// a sequency of SCC passes over each SCC that the manager is run over. This +/// typedef serves as a convenient way to refer to this construct. +typedef PassManager CGSCCPassManager; + /// \brief The CGSCC analysis manager. /// /// See the documentation for the AnalysisManager template for detail @@ -34,45 +41,6 @@ namespace llvm { /// pass manager infrastructure. typedef AnalysisManager CGSCCAnalysisManager; -class CGSCCPassManager { -public: - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - CGSCCPassManager() {} - CGSCCPassManager(CGSCCPassManager &&Arg) : Passes(std::move(Arg.Passes)) {} - CGSCCPassManager &operator=(CGSCCPassManager &&RHS) { - Passes = std::move(RHS.Passes); - return *this; - } - - /// \brief Run all of the CGSCC passes in this pass manager over a SCC. - PreservedAnalyses run(LazyCallGraph::SCC &C, - CGSCCAnalysisManager *AM = nullptr); - - template void addPass(CGSCCPassT Pass) { - Passes.emplace_back(new CGSCCPassModel(std::move(Pass))); - } - - static StringRef name() { return "CGSCCPassManager"; } - -private: - // Pull in the concept type and model template specialized for SCCs. - typedef detail::PassConcept - CGSCCPassConcept; - template - struct CGSCCPassModel - : detail::PassModel { - CGSCCPassModel(PassT Pass) - : detail::PassModel( - std::move(Pass)) {} - }; - - CGSCCPassManager(const CGSCCPassManager &) LLVM_DELETED_FUNCTION; - CGSCCPassManager &operator=(const CGSCCPassManager &) LLVM_DELETED_FUNCTION; - - std::vector> Passes; -}; - /// \brief A module analysis which acts as a proxy for a CGSCC analysis /// manager. /// diff --git a/llvm/include/llvm/IR/PassManager.h b/llvm/include/llvm/IR/PassManager.h index 550823f..70618c5 100644 --- a/llvm/include/llvm/IR/PassManager.h +++ b/llvm/include/llvm/IR/PassManager.h @@ -175,124 +175,95 @@ template class AnalysisManager; typedef AnalysisManager ModuleAnalysisManager; typedef AnalysisManager FunctionAnalysisManager; -/// \brief Manages a sequence of passes over Modules of IR. +/// \brief Manages a sequence of passes over units of IR. /// -/// A module pass manager contains a sequence of module passes. It is also -/// itself a module pass. When it is run over a module of LLVM IR, it will -/// sequentially run each pass it contains over that module. +/// A pass manager contains a sequence of passes to run over units of IR. It is +/// itself a valid pass over that unit of IR, and when over some given IR will +/// run each pass in sequence. This is the primary and most basic building +/// block of a pass pipeline. /// -/// If it is run with a \c ModuleAnalysisManager argument, it will propagate +/// If it is run with an \c AnalysisManager argument, it will propagate /// that analysis manager to each pass it runs, as well as calling the analysis /// manager's invalidation routine with the PreservedAnalyses of each pass it /// runs. -/// -/// Module passes can rely on having exclusive access to the module they are -/// run over. No other threads will access that module, and they can mutate it -/// freely. However, they must not mutate other LLVM IR modules. -class ModulePassManager { +template class PassManager { public: // We have to explicitly define all the special member functions because MSVC // refuses to generate them. - ModulePassManager() {} - ModulePassManager(ModulePassManager &&Arg) : Passes(std::move(Arg.Passes)) {} - ModulePassManager &operator=(ModulePassManager &&RHS) { + PassManager() {} + PassManager(PassManager &&Arg) : Passes(std::move(Arg.Passes)) {} + PassManager &operator=(PassManager &&RHS) { Passes = std::move(RHS.Passes); return *this; } - /// \brief Run all of the module passes in this module pass manager over - /// a module. - /// - /// This method should only be called for a single module as there is the - /// expectation that the lifetime of a pass is bounded to that of a module. - PreservedAnalyses run(Module &M, ModuleAnalysisManager *AM = nullptr); + /// \brief Run all of the passes in this manager over the IR. + PreservedAnalyses run(IRUnitT &IR, AnalysisManager *AM = nullptr) { + PreservedAnalyses PA = PreservedAnalyses::all(); - template void addPass(ModulePassT Pass) { - Passes.emplace_back(new ModulePassModel(std::move(Pass))); - } + if (detail::DebugPM) + dbgs() << "Starting pass manager run.\n"; - static StringRef name() { return "ModulePassManager"; } + for (unsigned Idx = 0, Size = Passes.size(); Idx != Size; ++Idx) { + if (detail::DebugPM) + dbgs() << "Running pass: " << Passes[Idx]->name() << "\n"; -private: - // Pull in the concept type and model template specialized for modules. - typedef detail::PassConcept ModulePassConcept; - template - struct ModulePassModel - : detail::PassModel { - ModulePassModel(PassT Pass) - : detail::PassModel( - std::move(Pass)) {} - }; + PreservedAnalyses PassPA = Passes[Idx]->run(IR, AM); - ModulePassManager(const ModulePassManager &) LLVM_DELETED_FUNCTION; - ModulePassManager &operator=(const ModulePassManager &) LLVM_DELETED_FUNCTION; + // If we have an active analysis manager at this level we want to ensure + // we update it as each pass runs and potentially invalidates analyses. + // We also update the preserved set of analyses based on what analyses we + // have already handled the invalidation for here and don't need to + // invalidate when finished. + if (AM) + PassPA = AM->invalidate(IR, std::move(PassPA)); - std::vector> Passes; -}; + // Finally, we intersect the final preserved analyses to compute the + // aggregate preserved set for this pass manager. + PA.intersect(std::move(PassPA)); -/// \brief Manages a sequence of passes over a Function of IR. -/// -/// A function pass manager contains a sequence of function passes. It is also -/// itself a function pass. When it is run over a function of LLVM IR, it will -/// sequentially run each pass it contains over that function. -/// -/// If it is run with a \c FunctionAnalysisManager argument, it will propagate -/// that analysis manager to each pass it runs, as well as calling the analysis -/// manager's invalidation routine with the PreservedAnalyses of each pass it -/// runs. -/// -/// Function passes can rely on having exclusive access to the function they -/// are run over. They should not read or modify any other functions! Other -/// threads or systems may be manipulating other functions in the module, and -/// so their state should never be relied on. -/// FIXME: Make the above true for all of LLVM's actual passes, some still -/// violate this principle. -/// -/// Function passes can also read the module containing the function, but they -/// should not modify that module outside of the use lists of various globals. -/// For example, a function pass is not permitted to add functions to the -/// module. -/// FIXME: Make the above true for all of LLVM's actual passes, some still -/// violate this principle. -class FunctionPassManager { -public: - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - FunctionPassManager() {} - FunctionPassManager(FunctionPassManager &&Arg) - : Passes(std::move(Arg.Passes)) {} - FunctionPassManager &operator=(FunctionPassManager &&RHS) { - Passes = std::move(RHS.Passes); - return *this; - } + // FIXME: Historically, the pass managers all called the LLVM context's + // yield function here. We don't have a generic way to acquire the + // context and it isn't yet clear what the right pattern is for yielding + // in the new pass manager so it is currently omitted. + //IR.getContext().yield(); + } + + if (detail::DebugPM) + dbgs() << "Finished pass manager run.\n"; - template void addPass(FunctionPassT Pass) { - Passes.emplace_back(new FunctionPassModel(std::move(Pass))); + return PA; } - PreservedAnalyses run(Function &F, FunctionAnalysisManager *AM = nullptr); + template void addPass(PassT Pass) { + Passes.emplace_back(new PassModel(std::move(Pass))); + } - static StringRef name() { return "FunctionPassManager"; } + static StringRef name() { return "PassManager"; } private: - // Pull in the concept type and model template specialized for functions. - typedef detail::PassConcept - FunctionPassConcept; + // Pull in the concept type and model template specialized for modules. + typedef detail::PassConcept> PassConcept; template - struct FunctionPassModel - : detail::PassModel { - FunctionPassModel(PassT Pass) - : detail::PassModel( + struct PassModel + : detail::PassModel, PassT> { + PassModel(PassT Pass) + : detail::PassModel, PassT>( std::move(Pass)) {} }; - FunctionPassManager(const FunctionPassManager &) LLVM_DELETED_FUNCTION; - FunctionPassManager & - operator=(const FunctionPassManager &) LLVM_DELETED_FUNCTION; + PassManager(const PassManager &) LLVM_DELETED_FUNCTION; + PassManager &operator=(const PassManager &) LLVM_DELETED_FUNCTION; - std::vector> Passes; + std::vector> Passes; }; +/// \brief Convenience typedef for a pass manager over modules. +typedef PassManager ModulePassManager; + +/// \brief Convenience typedef for a pass manager over functions. +typedef PassManager FunctionPassManager; + namespace detail { /// \brief A CRTP base used to implement analysis managers. @@ -761,6 +732,20 @@ private: /// \c FunctionAnalysisManagerModuleProxy analysis prior to running the function /// pass over the module to enable a \c FunctionAnalysisManager to be used /// within this run safely. +/// +/// Function passes run within this adaptor can rely on having exclusive access +/// to the function they are run over. They should not read or modify any other +/// functions! Other threads or systems may be manipulating other functions in +/// the module, and so their state should never be relied on. +/// FIXME: Make the above true for all of LLVM's actual passes, some still +/// violate this principle. +/// +/// Function passes can also read the module containing the function, but they +/// should not modify that module outside of the use lists of various globals. +/// For example, a function pass is not permitted to add functions to the +/// module. +/// FIXME: Make the above true for all of LLVM's actual passes, some still +/// violate this principle. template class ModuleToFunctionPassAdaptor { public: explicit ModuleToFunctionPassAdaptor(FunctionPassT Pass) diff --git a/llvm/lib/Analysis/CGSCCPassManager.cpp b/llvm/lib/Analysis/CGSCCPassManager.cpp index 7e86d66..659e37b 100644 --- a/llvm/lib/Analysis/CGSCCPassManager.cpp +++ b/llvm/lib/Analysis/CGSCCPassManager.cpp @@ -17,38 +17,6 @@ static cl::opt DebugPM("debug-cgscc-pass-manager", cl::Hidden, cl::desc("Print CGSCC pass management debugging information")); -PreservedAnalyses CGSCCPassManager::run(LazyCallGraph::SCC &C, - CGSCCAnalysisManager *AM) { - PreservedAnalyses PA = PreservedAnalyses::all(); - - if (DebugPM) - dbgs() << "Starting CGSCC pass manager run.\n"; - - for (unsigned Idx = 0, Size = Passes.size(); Idx != Size; ++Idx) { - if (DebugPM) - dbgs() << "Running CGSCC pass: " << Passes[Idx]->name() << "\n"; - - PreservedAnalyses PassPA = Passes[Idx]->run(C, AM); - - // If we have an active analysis manager at this level we want to ensure we - // update it as each pass runs and potentially invalidates analyses. We - // also update the preserved set of analyses based on what analyses we have - // already handled the invalidation for here and don't need to invalidate - // when finished. - if (AM) - PassPA = AM->invalidate(C, std::move(PassPA)); - - // Finally, we intersect the final preserved analyses to compute the - // aggregate preserved set for this pass manager. - PA.intersect(std::move(PassPA)); - } - - if (DebugPM) - dbgs() << "Finished CGSCC pass manager run.\n"; - - return PA; -} - char CGSCCAnalysisManagerModuleProxy::PassID; CGSCCAnalysisManagerModuleProxy::Result diff --git a/llvm/lib/IR/PassManager.cpp b/llvm/lib/IR/PassManager.cpp index 91533cc..3e6efb70 100644 --- a/llvm/lib/IR/PassManager.cpp +++ b/llvm/lib/IR/PassManager.cpp @@ -18,73 +18,6 @@ cl::opt llvm::detail::DebugPM( "debug-pass-manager", cl::Hidden, cl::desc("Print pass management debugging information")); -PreservedAnalyses ModulePassManager::run(Module &M, ModuleAnalysisManager *AM) { - PreservedAnalyses PA = PreservedAnalyses::all(); - - if (DebugPM) - dbgs() << "Starting module pass manager run.\n"; - - for (unsigned Idx = 0, Size = Passes.size(); Idx != Size; ++Idx) { - if (DebugPM) - dbgs() << "Running module pass: " << Passes[Idx]->name() << "\n"; - - PreservedAnalyses PassPA = Passes[Idx]->run(M, AM); - - // If we have an active analysis manager at this level we want to ensure we - // update it as each pass runs and potentially invalidates analyses. We - // also update the preserved set of analyses based on what analyses we have - // already handled the invalidation for here and don't need to invalidate - // when finished. - if (AM) - PassPA = AM->invalidate(M, std::move(PassPA)); - - // Finally, we intersect the final preserved analyses to compute the - // aggregate preserved set for this pass manager. - PA.intersect(std::move(PassPA)); - - M.getContext().yield(); - } - - if (DebugPM) - dbgs() << "Finished module pass manager run.\n"; - - return PA; -} - -PreservedAnalyses FunctionPassManager::run(Function &F, - FunctionAnalysisManager *AM) { - PreservedAnalyses PA = PreservedAnalyses::all(); - - if (DebugPM) - dbgs() << "Starting function pass manager run.\n"; - - for (unsigned Idx = 0, Size = Passes.size(); Idx != Size; ++Idx) { - if (DebugPM) - dbgs() << "Running function pass: " << Passes[Idx]->name() << "\n"; - - PreservedAnalyses PassPA = Passes[Idx]->run(F, AM); - - // If we have an active analysis manager at this level we want to ensure we - // update it as each pass runs and potentially invalidates analyses. We - // also update the preserved set of analyses based on what analyses we have - // already handled the invalidation for here and don't need to invalidate - // when finished. - if (AM) - PassPA = AM->invalidate(F, std::move(PassPA)); - - // Finally, we intersect the final preserved analyses to compute the - // aggregate preserved set for this pass manager. - PA.intersect(std::move(PassPA)); - - F.getContext().yield(); - } - - if (DebugPM) - dbgs() << "Finished function pass manager run.\n"; - - return PA; -} - char FunctionAnalysisManagerModuleProxy::PassID; FunctionAnalysisManagerModuleProxy::Result diff --git a/llvm/test/Other/new-pass-manager.ll b/llvm/test/Other/new-pass-manager.ll index 18b4d5c..05792d5 100644 --- a/llvm/test/Other/new-pass-manager.ll +++ b/llvm/test/Other/new-pass-manager.ll @@ -8,9 +8,9 @@ ; RUN: opt -disable-output -disable-verify -debug-pass-manager -debug-cgscc-pass-manager \ ; RUN: -passes=no-op-module %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PASS -; CHECK-MODULE-PASS: Starting module pass manager -; CHECK-MODULE-PASS-NEXT: Running module pass: NoOpModulePass -; CHECK-MODULE-PASS-NEXT: Finished module pass manager run. +; CHECK-MODULE-PASS: Starting pass manager +; CHECK-MODULE-PASS-NEXT: Running pass: NoOpModulePass +; CHECK-MODULE-PASS-NEXT: Finished pass manager ; RUN: opt -disable-output -disable-verify -debug-pass-manager -debug-cgscc-pass-manager \ ; RUN: -passes=no-op-cgscc %s 2>&1 \ @@ -18,14 +18,14 @@ ; RUN: opt -disable-output -disable-verify -debug-pass-manager -debug-cgscc-pass-manager \ ; RUN: -passes='cgscc(no-op-cgscc)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-CGSCC-PASS -; CHECK-CGSCC-PASS: Starting module pass manager -; CHECK-CGSCC-PASS-NEXT: Running module pass: ModuleToPostOrderCGSCCPassAdaptor +; CHECK-CGSCC-PASS: Starting pass manager +; CHECK-CGSCC-PASS-NEXT: Running pass: ModuleToPostOrderCGSCCPassAdaptor ; CHECK-CGSCC-PASS-NEXT: Running analysis: CGSCCAnalysisManagerModuleProxy ; CHECK-CGSCC-PASS-NEXT: Running analysis: Lazy CallGraph Analysis -; CHECK-CGSCC-PASS-NEXT: Starting CGSCC pass manager run. -; CHECK-CGSCC-PASS-NEXT: Running CGSCC pass: NoOpCGSCCPass -; CHECK-CGSCC-PASS-NEXT: Finished CGSCC pass manager run. -; CHECK-CGSCC-PASS-NEXT: Finished module pass manager run. +; CHECK-CGSCC-PASS-NEXT: Starting pass manager +; CHECK-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass +; CHECK-CGSCC-PASS-NEXT: Finished pass manager +; CHECK-CGSCC-PASS-NEXT: Finished pass manager ; RUN: opt -disable-output -disable-verify -debug-pass-manager -debug-cgscc-pass-manager \ ; RUN: -passes=no-op-function %s 2>&1 \ @@ -33,57 +33,57 @@ ; RUN: opt -disable-output -disable-verify -debug-pass-manager -debug-cgscc-pass-manager \ ; RUN: -passes='function(no-op-function)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS -; CHECK-FUNCTION-PASS: Starting module pass manager -; CHECK-FUNCTION-PASS-NEXT: Running module pass: ModuleToFunctionPassAdaptor +; CHECK-FUNCTION-PASS: Starting pass manager +; CHECK-FUNCTION-PASS-NEXT: Running pass: ModuleToFunctionPassAdaptor ; CHECK-FUNCTION-PASS-NEXT: Running analysis: FunctionAnalysisManagerModuleProxy -; CHECK-FUNCTION-PASS-NEXT: Starting function pass manager run. -; CHECK-FUNCTION-PASS-NEXT: Running function pass: NoOpFunctionPass -; CHECK-FUNCTION-PASS-NEXT: Finished function pass manager run. -; CHECK-FUNCTION-PASS-NEXT: Finished module pass manager run. +; CHECK-FUNCTION-PASS-NEXT: Starting pass manager +; CHECK-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass +; CHECK-FUNCTION-PASS-NEXT: Finished pass manager +; CHECK-FUNCTION-PASS-NEXT: Finished pass manager ; RUN: opt -disable-output -debug-pass-manager -passes=print %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PRINT -; CHECK-MODULE-PRINT: Starting module pass manager -; CHECK-MODULE-PRINT: Running module pass: VerifierPass -; CHECK-MODULE-PRINT: Running module pass: PrintModulePass +; CHECK-MODULE-PRINT: Starting pass manager +; CHECK-MODULE-PRINT: Running pass: VerifierPass +; CHECK-MODULE-PRINT: Running pass: PrintModulePass ; CHECK-MODULE-PRINT: ModuleID ; CHECK-MODULE-PRINT: define void @foo() -; CHECK-MODULE-PRINT: Running module pass: VerifierPass -; CHECK-MODULE-PRINT: Finished module pass manager +; CHECK-MODULE-PRINT: Running pass: VerifierPass +; CHECK-MODULE-PRINT: Finished pass manager ; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='print,verify' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-VERIFY -; CHECK-MODULE-VERIFY: Starting module pass manager -; CHECK-MODULE-VERIFY: Running module pass: PrintModulePass +; CHECK-MODULE-VERIFY: Starting pass manager +; CHECK-MODULE-VERIFY: Running pass: PrintModulePass ; CHECK-MODULE-VERIFY: ModuleID ; CHECK-MODULE-VERIFY: define void @foo() -; CHECK-MODULE-VERIFY: Running module pass: VerifierPass -; CHECK-MODULE-VERIFY: Finished module pass manager +; CHECK-MODULE-VERIFY: Running pass: VerifierPass +; CHECK-MODULE-VERIFY: Finished pass manager ; 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 module pass manager -; CHECK-FUNCTION-PRINT: Running module pass: VerifierPass -; CHECK-FUNCTION-PRINT: Running module pass: ModuleToFunctionPassAdaptor +; CHECK-FUNCTION-PRINT: Starting pass manager +; CHECK-FUNCTION-PRINT: Running pass: VerifierPass +; CHECK-FUNCTION-PRINT: Running pass: ModuleToFunctionPassAdaptor ; CHECK-FUNCTION-PRINT: Running analysis: FunctionAnalysisManagerModuleProxy -; CHECK-FUNCTION-PRINT: Starting function pass manager -; CHECK-FUNCTION-PRINT: Running function pass: PrintFunctionPass +; CHECK-FUNCTION-PRINT: Starting pass manager +; CHECK-FUNCTION-PRINT: Running pass: PrintFunctionPass ; CHECK-FUNCTION-PRINT-NOT: ModuleID ; CHECK-FUNCTION-PRINT: define void @foo() -; CHECK-FUNCTION-PRINT: Finished function pass manager -; CHECK-FUNCTION-PRINT: Running module pass: VerifierPass -; CHECK-FUNCTION-PRINT: Finished module pass manager +; CHECK-FUNCTION-PRINT: Finished pass manager +; CHECK-FUNCTION-PRINT: Running pass: VerifierPass +; CHECK-FUNCTION-PRINT: Finished pass manager ; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='function(print,verify)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-VERIFY -; CHECK-FUNCTION-VERIFY: Starting module pass manager -; CHECK-FUNCTION-VERIFY: Starting function pass manager -; CHECK-FUNCTION-VERIFY: Running function pass: PrintFunctionPass +; CHECK-FUNCTION-VERIFY: Starting pass manager +; CHECK-FUNCTION-VERIFY: Starting pass manager +; CHECK-FUNCTION-VERIFY: Running pass: PrintFunctionPass ; CHECK-FUNCTION-VERIFY-NOT: ModuleID ; CHECK-FUNCTION-VERIFY: define void @foo() -; CHECK-FUNCTION-VERIFY: Running function pass: VerifierPass -; CHECK-FUNCTION-VERIFY: Finished function pass manager -; CHECK-FUNCTION-VERIFY: Finished module pass manager +; CHECK-FUNCTION-VERIFY: Running pass: VerifierPass +; CHECK-FUNCTION-VERIFY: Finished pass manager +; CHECK-FUNCTION-VERIFY: Finished pass manager ; RUN: opt -S -o - -passes='no-op-module,no-op-module' %s \ ; RUN: | FileCheck %s --check-prefix=CHECK-NOOP @@ -98,41 +98,41 @@ ; RUN: opt -disable-output -debug-pass-manager -verify-each -passes='no-op-module,function(no-op-function)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-VERIFY-EACH -; CHECK-VERIFY-EACH: Starting module pass manager -; CHECK-VERIFY-EACH: Running module pass: VerifierPass -; CHECK-VERIFY-EACH: Running module pass: NoOpModulePass -; CHECK-VERIFY-EACH: Running module pass: VerifierPass -; CHECK-VERIFY-EACH: Starting function pass manager -; CHECK-VERIFY-EACH: Running function pass: NoOpFunctionPass -; CHECK-VERIFY-EACH: Running function pass: VerifierPass -; CHECK-VERIFY-EACH: Finished function pass manager -; CHECK-VERIFY-EACH: Running module pass: VerifierPass -; CHECK-VERIFY-EACH: Finished module pass manager +; CHECK-VERIFY-EACH: Starting pass manager +; CHECK-VERIFY-EACH: Running pass: VerifierPass +; CHECK-VERIFY-EACH: Running pass: NoOpModulePass +; CHECK-VERIFY-EACH: Running pass: VerifierPass +; CHECK-VERIFY-EACH: Starting pass manager +; CHECK-VERIFY-EACH: Running pass: NoOpFunctionPass +; CHECK-VERIFY-EACH: Running pass: VerifierPass +; CHECK-VERIFY-EACH: Finished pass manager +; CHECK-VERIFY-EACH: Running pass: VerifierPass +; CHECK-VERIFY-EACH: Finished pass manager ; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='no-op-module,function(no-op-function)' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-NO-VERIFY -; CHECK-NO-VERIFY: Starting module pass manager +; CHECK-NO-VERIFY: Starting pass manager ; CHECK-NO-VERIFY-NOT: VerifierPass -; CHECK-NO-VERIFY: Running module pass: NoOpModulePass +; CHECK-NO-VERIFY: Running pass: NoOpModulePass ; CHECK-NO-VERIFY-NOT: VerifierPass -; CHECK-NO-VERIFY: Starting function pass manager -; CHECK-NO-VERIFY: Running function pass: NoOpFunctionPass +; CHECK-NO-VERIFY: Starting pass manager +; CHECK-NO-VERIFY: Running pass: NoOpFunctionPass ; CHECK-NO-VERIFY-NOT: VerifierPass -; CHECK-NO-VERIFY: Finished function pass manager +; CHECK-NO-VERIFY: Finished pass manager ; CHECK-NO-VERIFY-NOT: VerifierPass -; CHECK-NO-VERIFY: Finished module pass manager +; CHECK-NO-VERIFY: Finished pass manager ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-pass-manager \ ; RUN: -passes='require,cgscc(require,function(require))' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-ANALYSES -; CHECK-ANALYSES: Starting module pass manager -; CHECK-ANALYSES: Running module pass: RequireAnalysisPass +; CHECK-ANALYSES: Starting pass manager +; CHECK-ANALYSES: Running pass: RequireAnalysisPass ; CHECK-ANALYSES: Running analysis: NoOpModuleAnalysis -; CHECK-ANALYSES: Starting CGSCC pass manager -; CHECK-ANALYSES: Running CGSCC pass: RequireAnalysisPass +; CHECK-ANALYSES: Starting pass manager +; CHECK-ANALYSES: Running pass: RequireAnalysisPass ; CHECK-ANALYSES: Running analysis: NoOpCGSCCAnalysis -; CHECK-ANALYSES: Starting function pass manager -; CHECK-ANALYSES: Running function pass: RequireAnalysisPass +; CHECK-ANALYSES: Starting pass manager +; CHECK-ANALYSES: Running pass: RequireAnalysisPass ; CHECK-ANALYSES: Running analysis: NoOpFunctionAnalysis ; Make sure no-op passes that preserve all analyses don't even try to do any @@ -140,22 +140,22 @@ ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-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 module pass manager +; CHECK-NO-OP-INVALIDATION: Starting pass manager ; CHECK-NO-OP-INVALIDATION-NOT: Invalidating all non-preserved analyses ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-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 module pass manager -; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running module pass: RequireAnalysisPass +; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Starting pass manager +; 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 ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-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 module pass manager -; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running module pass: RequireAnalysisPass +; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Starting pass manager +; 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 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis @@ -163,16 +163,16 @@ ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-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 CGSCC pass manager -; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running CGSCC pass: RequireAnalysisPass +; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Starting pass manager +; 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 ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-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 CGSCC pass manager -; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running CGSCC pass: RequireAnalysisPass +; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Starting pass manager +; 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 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis @@ -180,16 +180,16 @@ ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-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 function pass manager -; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running function pass: RequireAnalysisPass +; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Starting pass manager +; 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 ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-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 function pass manager -; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running function pass: RequireAnalysisPass +; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Starting pass manager +; 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 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis @@ -197,74 +197,74 @@ ; RUN: opt -disable-output -disable-verify -debug-pass-manager -debug-cgscc-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 module pass manager run. -; CHECK-INVALIDATE-ALL: Running module pass: RequireAnalysisPass +; CHECK-INVALIDATE-ALL: Starting pass manager +; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL: Starting module pass manager run. -; CHECK-INVALIDATE-ALL: Running module pass: RequireAnalysisPass +; CHECK-INVALIDATE-ALL: Starting pass manager +; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL: Starting function pass manager run. -; CHECK-INVALIDATE-ALL: Running function pass: RequireAnalysisPass +; CHECK-INVALIDATE-ALL: Starting pass manager +; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis -; CHECK-INVALIDATE-ALL: Running function pass: InvalidateAllAnalysesPass +; CHECK-INVALIDATE-ALL: Running pass: InvalidateAllAnalysesPass ; CHECK-INVALIDATE-ALL: Invalidating all non-preserved analyses ; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpFunctionAnalysis -; CHECK-INVALIDATE-ALL: Running function pass: RequireAnalysisPass +; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis -; CHECK-INVALIDATE-ALL: Finished function pass manager run. +; CHECK-INVALIDATE-ALL: Finished pass manager ; CHECK-INVALIDATE-ALL: Invalidating all non-preserved analyses ; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpFunctionAnalysis ; CHECK-INVALIDATE-ALL: Invalidating all non-preserved analyses ; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL: Running module pass: RequireAnalysisPass +; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL: Finished module pass manager run. +; CHECK-INVALIDATE-ALL: Finished pass manager ; CHECK-INVALIDATE-ALL: Invalidating all non-preserved analyses ; CHECK-INVALIDATE-ALL-NOT: Invalidating analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL: Running module pass: RequireAnalysisPass +; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL: Finished module pass manager run. +; CHECK-INVALIDATE-ALL: Finished pass manager ; RUN: opt -disable-output -disable-verify -debug-pass-manager -debug-cgscc-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 module pass manager run. -; CHECK-INVALIDATE-ALL-CG: Running module pass: RequireAnalysisPass +; CHECK-INVALIDATE-ALL-CG: Starting pass manager +; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL-CG: Starting module pass manager run. -; CHECK-INVALIDATE-ALL-CG: Running module pass: RequireAnalysisPass +; CHECK-INVALIDATE-ALL-CG: Starting pass manager +; 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 CGSCC pass: RequireAnalysisPass +; CHECK-INVALIDATE-ALL-CG: Starting pass manager +; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis -; CHECK-INVALIDATE-ALL-CG: Starting function pass manager run. -; CHECK-INVALIDATE-ALL-CG: Running function pass: RequireAnalysisPass +; CHECK-INVALIDATE-ALL-CG: Starting pass manager +; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis -; CHECK-INVALIDATE-ALL-CG: Running function pass: InvalidateAllAnalysesPass +; CHECK-INVALIDATE-ALL-CG: Running pass: InvalidateAllAnalysesPass ; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpFunctionAnalysis -; CHECK-INVALIDATE-ALL-CG: Running function pass: RequireAnalysisPass +; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis -; CHECK-INVALIDATE-ALL-CG: Finished function pass manager run. +; CHECK-INVALIDATE-ALL-CG: Finished pass manager ; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpFunctionAnalysis ; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpCGSCCAnalysis -; CHECK-INVALIDATE-ALL-CG: Running CGSCC pass: RequireAnalysisPass +; 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: Finished pass manager ; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses ; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpCGSCCAnalysis ; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL-CG: Running module pass: RequireAnalysisPass +; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL-CG: Finished module pass manager run. +; CHECK-INVALIDATE-ALL-CG: Finished pass manager ; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses ; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL-CG: Running module pass: RequireAnalysisPass +; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis -; CHECK-INVALIDATE-ALL-CG: Finished module pass manager run. +; CHECK-INVALIDATE-ALL-CG: Finished pass manager define void @foo() { ret void diff --git a/llvm/test/Other/pass-pipeline-parsing.ll b/llvm/test/Other/pass-pipeline-parsing.ll index 3dedea2..0b49eb7 100644 --- a/llvm/test/Other/pass-pipeline-parsing.ll +++ b/llvm/test/Other/pass-pipeline-parsing.ll @@ -1,56 +1,55 @@ ; 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 module pass manager -; CHECK-TWO-NOOP-MP: Running module pass: NoOpModulePass -; CHECK-TWO-NOOP-MP: Running module pass: NoOpModulePass -; CHECK-TWO-NOOP-MP: Finished module pass manager +; CHECK-TWO-NOOP-MP: Starting pass manager +; CHECK-TWO-NOOP-MP: Running pass: NoOpModulePass +; CHECK-TWO-NOOP-MP: Running pass: NoOpModulePass +; CHECK-TWO-NOOP-MP: Finished pass manager ; 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 module pass manager -; CHECK-NESTED-TWO-NOOP-MP: Running module pass: ModulePassManager -; CHECK-NESTED-TWO-NOOP-MP: Starting module pass manager -; CHECK-NESTED-TWO-NOOP-MP: Running module pass: NoOpModulePass -; CHECK-NESTED-TWO-NOOP-MP: Running module pass: NoOpModulePass -; CHECK-NESTED-TWO-NOOP-MP: Finished module pass manager -; CHECK-NESTED-TWO-NOOP-MP: Finished module pass manager +; CHECK-NESTED-TWO-NOOP-MP: Starting pass manager +; CHECK-NESTED-TWO-NOOP-MP: Starting pass manager +; CHECK-NESTED-TWO-NOOP-MP: Running pass: NoOpModulePass +; CHECK-NESTED-TWO-NOOP-MP: Running pass: NoOpModulePass +; CHECK-NESTED-TWO-NOOP-MP: Finished pass manager +; CHECK-NESTED-TWO-NOOP-MP: Finished pass manager ; 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 module pass manager -; CHECK-TWO-NOOP-FP: Running module pass: ModuleToFunctionPassAdaptor -; CHECK-TWO-NOOP-FP: Starting function pass manager -; CHECK-TWO-NOOP-FP: Running function pass: NoOpFunctionPass -; CHECK-TWO-NOOP-FP: Running function pass: NoOpFunctionPass -; CHECK-TWO-NOOP-FP: Finished function pass manager -; CHECK-TWO-NOOP-FP: Finished module pass manager +; CHECK-TWO-NOOP-FP: Starting pass manager +; CHECK-TWO-NOOP-FP: Running pass: ModuleToFunctionPassAdaptor +; CHECK-TWO-NOOP-FP: Starting pass manager +; CHECK-TWO-NOOP-FP: Running pass: NoOpFunctionPass +; CHECK-TWO-NOOP-FP: Running pass: NoOpFunctionPass +; CHECK-TWO-NOOP-FP: Finished pass manager +; CHECK-TWO-NOOP-FP: Finished pass manager ; 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 module pass manager -; CHECK-NESTED-TWO-NOOP-FP: Running module pass: ModuleToFunctionPassAdaptor -; CHECK-NESTED-TWO-NOOP-FP: Starting function pass manager -; CHECK-NESTED-TWO-NOOP-FP: Running function pass: NoOpFunctionPass -; CHECK-NESTED-TWO-NOOP-FP: Running function pass: NoOpFunctionPass -; CHECK-NESTED-TWO-NOOP-FP: Finished function pass manager -; CHECK-NESTED-TWO-NOOP-FP: Finished module pass manager +; CHECK-NESTED-TWO-NOOP-FP: Starting pass manager +; CHECK-NESTED-TWO-NOOP-FP: Running pass: ModuleToFunctionPassAdaptor +; CHECK-NESTED-TWO-NOOP-FP: Starting pass manager +; CHECK-NESTED-TWO-NOOP-FP: Running pass: NoOpFunctionPass +; CHECK-NESTED-TWO-NOOP-FP: Running pass: NoOpFunctionPass +; CHECK-NESTED-TWO-NOOP-FP: Finished pass manager +; CHECK-NESTED-TWO-NOOP-FP: Finished pass manager ; 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 module pass manager -; CHECK-MIXED-FP-AND-MP: Running module pass: NoOpModulePass -; CHECK-MIXED-FP-AND-MP: Running module pass: ModuleToFunctionPassAdaptor -; CHECK-MIXED-FP-AND-MP: Starting function pass manager -; CHECK-MIXED-FP-AND-MP: Running function pass: NoOpFunctionPass -; CHECK-MIXED-FP-AND-MP: Running function pass: NoOpFunctionPass -; CHECK-MIXED-FP-AND-MP: Finished function pass manager -; CHECK-MIXED-FP-AND-MP: Running module pass: NoOpModulePass -; CHECK-MIXED-FP-AND-MP: Finished module pass manager +; CHECK-MIXED-FP-AND-MP: Starting pass manager +; CHECK-MIXED-FP-AND-MP: Running pass: NoOpModulePass +; CHECK-MIXED-FP-AND-MP: Running pass: ModuleToFunctionPassAdaptor +; CHECK-MIXED-FP-AND-MP: Starting pass manager +; CHECK-MIXED-FP-AND-MP: Running pass: NoOpFunctionPass +; CHECK-MIXED-FP-AND-MP: Running pass: NoOpFunctionPass +; CHECK-MIXED-FP-AND-MP: Finished pass manager +; CHECK-MIXED-FP-AND-MP: Running pass: NoOpModulePass +; CHECK-MIXED-FP-AND-MP: Finished pass manager ; RUN: not opt -disable-output -debug-pass-manager \ ; RUN: -passes='no-op-module)' %s 2>&1 \ @@ -105,38 +104,38 @@ ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-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 module pass manager -; CHECK-TWO-NOOP-CG: Running module pass: ModuleToPostOrderCGSCCPassAdaptor -; CHECK-TWO-NOOP-CG: Starting CGSCC pass manager -; CHECK-TWO-NOOP-CG: Running CGSCC pass: NoOpCGSCCPass -; CHECK-TWO-NOOP-CG: Running CGSCC pass: NoOpCGSCCPass -; CHECK-TWO-NOOP-CG: Finished CGSCC pass manager -; CHECK-TWO-NOOP-CG: Finished module pass manager +; CHECK-TWO-NOOP-CG: Starting pass manager +; CHECK-TWO-NOOP-CG: Running pass: ModuleToPostOrderCGSCCPassAdaptor +; CHECK-TWO-NOOP-CG: Starting pass manager +; CHECK-TWO-NOOP-CG: Running pass: NoOpCGSCCPass +; CHECK-TWO-NOOP-CG: Running pass: NoOpCGSCCPass +; CHECK-TWO-NOOP-CG: Finished pass manager +; CHECK-TWO-NOOP-CG: Finished pass manager ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-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 module pass manager -; CHECK-NESTED-MP-CG-FP: Starting module pass manager -; CHECK-NESTED-MP-CG-FP: Running module pass: ModuleToFunctionPassAdaptor -; CHECK-NESTED-MP-CG-FP: Starting function pass manager -; CHECK-NESTED-MP-CG-FP: Running function pass: NoOpFunctionPass -; CHECK-NESTED-MP-CG-FP: Finished function pass manager -; CHECK-NESTED-MP-CG-FP: Running module pass: ModuleToPostOrderCGSCCPassAdaptor -; CHECK-NESTED-MP-CG-FP: Starting CGSCC pass manager -; CHECK-NESTED-MP-CG-FP: Running CGSCC pass: NoOpCGSCCPass -; CHECK-NESTED-MP-CG-FP: Running CGSCC pass: CGSCCToFunctionPassAdaptor -; CHECK-NESTED-MP-CG-FP: Starting function pass manager -; CHECK-NESTED-MP-CG-FP: Running function pass: NoOpFunctionPass -; CHECK-NESTED-MP-CG-FP: Finished function pass manager -; CHECK-NESTED-MP-CG-FP: Running CGSCC pass: NoOpCGSCCPass -; CHECK-NESTED-MP-CG-FP: Finished CGSCC pass manager -; CHECK-NESTED-MP-CG-FP: Running module pass: ModuleToFunctionPassAdaptor -; CHECK-NESTED-MP-CG-FP: Starting function pass manager -; CHECK-NESTED-MP-CG-FP: Running function pass: NoOpFunctionPass -; CHECK-NESTED-MP-CG-FP: Finished function pass manager -; CHECK-NESTED-MP-CG-FP: Finished module pass manager -; CHECK-NESTED-MP-CG-FP: Finished module pass manager +; CHECK-NESTED-MP-CG-FP: Starting pass manager +; CHECK-NESTED-MP-CG-FP: Starting pass manager +; CHECK-NESTED-MP-CG-FP: Running pass: ModuleToFunctionPassAdaptor +; CHECK-NESTED-MP-CG-FP: Starting pass manager +; CHECK-NESTED-MP-CG-FP: Running pass: NoOpFunctionPass +; CHECK-NESTED-MP-CG-FP: Finished pass manager +; CHECK-NESTED-MP-CG-FP: Running pass: ModuleToPostOrderCGSCCPassAdaptor +; CHECK-NESTED-MP-CG-FP: Starting pass manager +; CHECK-NESTED-MP-CG-FP: Running pass: NoOpCGSCCPass +; CHECK-NESTED-MP-CG-FP: Running pass: CGSCCToFunctionPassAdaptor +; CHECK-NESTED-MP-CG-FP: Starting pass manager +; CHECK-NESTED-MP-CG-FP: Running pass: NoOpFunctionPass +; CHECK-NESTED-MP-CG-FP: Finished pass manager +; CHECK-NESTED-MP-CG-FP: Running pass: NoOpCGSCCPass +; CHECK-NESTED-MP-CG-FP: Finished pass manager +; CHECK-NESTED-MP-CG-FP: Running pass: ModuleToFunctionPassAdaptor +; CHECK-NESTED-MP-CG-FP: Starting pass manager +; CHECK-NESTED-MP-CG-FP: Running pass: NoOpFunctionPass +; CHECK-NESTED-MP-CG-FP: Finished pass manager +; CHECK-NESTED-MP-CG-FP: Finished pass manager +; CHECK-NESTED-MP-CG-FP: Finished pass manager define void @f() { ret void