llvm.org GIT mirror llvm / 92602ea
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225783 91177308-0d34-0410-b5e6-96231b3b80d8 Chandler Carruth 4 years ago
6 changed file(s) with 260 addition(s) and 407 deletion(s). Raw diff Collapse all Expand all
2525
2626 namespace llvm {
2727
28 /// \brief The CGSCC pass manager.
29 ///
30 /// See the documentation for the PassManager template for details. It runs
31 /// a sequency of SCC passes over each SCC that the manager is run over. This
32 /// typedef serves as a convenient way to refer to this construct.
33 typedef PassManager CGSCCPassManager;
34
2835 /// \brief The CGSCC analysis manager.
2936 ///
3037 /// See the documentation for the AnalysisManager template for detail
3239 /// construct in the adaptors and proxies used to integrate this into the larger
3340 /// pass manager infrastructure.
3441 typedef AnalysisManager CGSCCAnalysisManager;
35
36 class CGSCCPassManager {
37 public:
38 // We have to explicitly define all the special member functions because MSVC
39 // refuses to generate them.
40 CGSCCPassManager() {}
41 CGSCCPassManager(CGSCCPassManager &&Arg) : Passes(std::move(Arg.Passes)) {}
42 CGSCCPassManager &operator=(CGSCCPassManager &&RHS) {
43 Passes = std::move(RHS.Passes);
44 return *this;
45 }
46
47 /// \brief Run all of the CGSCC passes in this pass manager over a SCC.
48 PreservedAnalyses run(LazyCallGraph::SCC &C,
49 CGSCCAnalysisManager *AM = nullptr);
50
51 template void addPass(CGSCCPassT Pass) {
52 Passes.emplace_back(new CGSCCPassModel(std::move(Pass)));
53 }
54
55 static StringRef name() { return "CGSCCPassManager"; }
56
57 private:
58 // Pull in the concept type and model template specialized for SCCs.
59 typedef detail::PassConcept
60 CGSCCPassConcept;
61 template
62 struct CGSCCPassModel
63 : detail::PassModel {
64 CGSCCPassModel(PassT Pass)
65 : detail::PassModel(
66 std::move(Pass)) {}
67 };
68
69 CGSCCPassManager(const CGSCCPassManager &) LLVM_DELETED_FUNCTION;
70 CGSCCPassManager &operator=(const CGSCCPassManager &) LLVM_DELETED_FUNCTION;
71
72 std::vector> Passes;
73 };
7442
7543 /// \brief A module analysis which acts as a proxy for a CGSCC analysis
7644 /// manager.
174174 typedef AnalysisManager ModuleAnalysisManager;
175175 typedef AnalysisManager FunctionAnalysisManager;
176176
177 /// \brief Manages a sequence of passes over Modules of IR.
178 ///
179 /// A module pass manager contains a sequence of module passes. It is also
180 /// itself a module pass. When it is run over a module of LLVM IR, it will
181 /// sequentially run each pass it contains over that module.
182 ///
183 /// If it is run with a \c ModuleAnalysisManager argument, it will propagate
177 /// \brief Manages a sequence of passes over units of IR.
178 ///
179 /// A pass manager contains a sequence of passes to run over units of IR. It is
180 /// itself a valid pass over that unit of IR, and when over some given IR will
181 /// run each pass in sequence. This is the primary and most basic building
182 /// block of a pass pipeline.
183 ///
184 /// If it is run with an \c AnalysisManager argument, it will propagate
184185 /// that analysis manager to each pass it runs, as well as calling the analysis
185186 /// manager's invalidation routine with the PreservedAnalyses of each pass it
186187 /// runs.
187 ///
188 /// Module passes can rely on having exclusive access to the module they are
189 /// run over. No other threads will access that module, and they can mutate it
190 /// freely. However, they must not mutate other LLVM IR modules.
191 class ModulePassManager {
188 template class PassManager {
192189 public:
193190 // We have to explicitly define all the special member functions because MSVC
194191 // refuses to generate them.
195 ModulePassManager() {}
196 ModulePassManager(ModulePassManager &&Arg) : Passes(std::move(Arg.Passes)) {}
197 ModulePassManager &operator=(ModulePassManager &&RHS) {
192 PassManager() {}
193 PassManager(PassManager &&Arg) : Passes(std::move(Arg.Passes)) {}
194 PassManager &operator=(PassManager &&RHS) {
198195 Passes = std::move(RHS.Passes);
199196 return *this;
200197 }
201198
202 /// \brief Run all of the module passes in this module pass manager over
203 /// a module.
204 ///
205 /// This method should only be called for a single module as there is the
206 /// expectation that the lifetime of a pass is bounded to that of a module.
207 PreservedAnalyses run(Module &M, ModuleAnalysisManager *AM = nullptr);
208
209 template void addPass(ModulePassT Pass) {
210 Passes.emplace_back(new ModulePassModel(std::move(Pass)));
211 }
212
213 static StringRef name() { return "ModulePassManager"; }
199 /// \brief Run all of the passes in this manager over the IR.
200 PreservedAnalyses run(IRUnitT &IR, AnalysisManager *AM = nullptr) {
201 PreservedAnalyses PA = PreservedAnalyses::all();
202
203 if (detail::DebugPM)
204 dbgs() << "Starting pass manager run.\n";
205
206 for (unsigned Idx = 0, Size = Passes.size(); Idx != Size; ++Idx) {
207 if (detail::DebugPM)
208 dbgs() << "Running pass: " << Passes[Idx]->name() << "\n";
209
210 PreservedAnalyses PassPA = Passes[Idx]->run(IR, AM);
211
212 // If we have an active analysis manager at this level we want to ensure
213 // we update it as each pass runs and potentially invalidates analyses.
214 // We also update the preserved set of analyses based on what analyses we
215 // have already handled the invalidation for here and don't need to
216 // invalidate when finished.
217 if (AM)
218 PassPA = AM->invalidate(IR, std::move(PassPA));
219
220 // Finally, we intersect the final preserved analyses to compute the
221 // aggregate preserved set for this pass manager.
222 PA.intersect(std::move(PassPA));
223
224 // FIXME: Historically, the pass managers all called the LLVM context's
225 // yield function here. We don't have a generic way to acquire the
226 // context and it isn't yet clear what the right pattern is for yielding
227 // in the new pass manager so it is currently omitted.
228 //IR.getContext().yield();
229 }
230
231 if (detail::DebugPM)
232 dbgs() << "Finished pass manager run.\n";
233
234 return PA;
235 }
236
237 template void addPass(PassT Pass) {
238 Passes.emplace_back(new PassModel(std::move(Pass)));
239 }
240
241 static StringRef name() { return "PassManager"; }
214242
215243 private:
216244 // Pull in the concept type and model template specialized for modules.
217 typedef detail::PassConcept<Module, ModuleAnalysisManager> ModulePassConcept;
245 typedef detail::PassConcept<IRUnitT, AnalysisManager> PassConcept;
218246 template
219 struct ModulePassModel
220 : detail::PassModel {
221 ModulePassModel(PassT Pass)
222 : detail::PassModel(
247 struct PassModel
248 : detail::PassModel, PassT> {
249 PassModel(PassT Pass)
250 : detail::PassModel, PassT>(
223251 std::move(Pass)) {}
224252 };
225253
226 ModulePassManager(const ModulePassManager &) LLVM_DELETED_FUNCTION;
227 ModulePassManager &operator=(const ModulePassManager &) LLVM_DELETED_FUNCTION;
228
229 std::vector> Passes;
230 };
231
232 /// \brief Manages a sequence of passes over a Function of IR.
233 ///
234 /// A function pass manager contains a sequence of function passes. It is also
235 /// itself a function pass. When it is run over a function of LLVM IR, it will
236 /// sequentially run each pass it contains over that function.
237 ///
238 /// If it is run with a \c FunctionAnalysisManager argument, it will propagate
239 /// that analysis manager to each pass it runs, as well as calling the analysis
240 /// manager's invalidation routine with the PreservedAnalyses of each pass it
241 /// runs.
242 ///
243 /// Function passes can rely on having exclusive access to the function they
244 /// are run over. They should not read or modify any other functions! Other
245 /// threads or systems may be manipulating other functions in the module, and
246 /// so their state should never be relied on.
247 /// FIXME: Make the above true for all of LLVM's actual passes, some still
248 /// violate this principle.
249 ///
250 /// Function passes can also read the module containing the function, but they
251 /// should not modify that module outside of the use lists of various globals.
252 /// For example, a function pass is not permitted to add functions to the
253 /// module.
254 /// FIXME: Make the above true for all of LLVM's actual passes, some still
255 /// violate this principle.
256 class FunctionPassManager {
257 public:
258 // We have to explicitly define all the special member functions because MSVC
259 // refuses to generate them.
260 FunctionPassManager() {}
261 FunctionPassManager(FunctionPassManager &&Arg)
262 : Passes(std::move(Arg.Passes)) {}
263 FunctionPassManager &operator=(FunctionPassManager &&RHS) {
264 Passes = std::move(RHS.Passes);
265 return *this;
266 }
267
268 template void addPass(FunctionPassT Pass) {
269 Passes.emplace_back(new FunctionPassModel(std::move(Pass)));
270 }
271
272 PreservedAnalyses run(Function &F, FunctionAnalysisManager *AM = nullptr);
273
274 static StringRef name() { return "FunctionPassManager"; }
275
276 private:
277 // Pull in the concept type and model template specialized for functions.
278 typedef detail::PassConcept
279 FunctionPassConcept;
280 template
281 struct FunctionPassModel
282 : detail::PassModel {
283 FunctionPassModel(PassT Pass)
284 : detail::PassModel(
285 std::move(Pass)) {}
286 };
287
288 FunctionPassManager(const FunctionPassManager &) LLVM_DELETED_FUNCTION;
289 FunctionPassManager &
290 operator=(const FunctionPassManager &) LLVM_DELETED_FUNCTION;
291
292 std::vector> Passes;
293 };
254 PassManager(const PassManager &) LLVM_DELETED_FUNCTION;
255 PassManager &operator=(const PassManager &) LLVM_DELETED_FUNCTION;
256
257 std::vector> Passes;
258 };
259
260 /// \brief Convenience typedef for a pass manager over modules.
261 typedef PassManager ModulePassManager;
262
263 /// \brief Convenience typedef for a pass manager over functions.
264 typedef PassManager FunctionPassManager;
294265
295266 namespace detail {
296267
760731 /// \c FunctionAnalysisManagerModuleProxy analysis prior to running the function
761732 /// pass over the module to enable a \c FunctionAnalysisManager to be used
762733 /// within this run safely.
734 ///
735 /// Function passes run within this adaptor can rely on having exclusive access
736 /// to the function they are run over. They should not read or modify any other
737 /// functions! Other threads or systems may be manipulating other functions in
738 /// the module, and so their state should never be relied on.
739 /// FIXME: Make the above true for all of LLVM's actual passes, some still
740 /// violate this principle.
741 ///
742 /// Function passes can also read the module containing the function, but they
743 /// should not modify that module outside of the use lists of various globals.
744 /// For example, a function pass is not permitted to add functions to the
745 /// module.
746 /// FIXME: Make the above true for all of LLVM's actual passes, some still
747 /// violate this principle.
763748 template class ModuleToFunctionPassAdaptor {
764749 public:
765750 explicit ModuleToFunctionPassAdaptor(FunctionPassT Pass)
1515 static cl::opt
1616 DebugPM("debug-cgscc-pass-manager", cl::Hidden,
1717 cl::desc("Print CGSCC pass management debugging information"));
18
19 PreservedAnalyses CGSCCPassManager::run(LazyCallGraph::SCC &C,
20 CGSCCAnalysisManager *AM) {
21 PreservedAnalyses PA = PreservedAnalyses::all();
22
23 if (DebugPM)
24 dbgs() << "Starting CGSCC pass manager run.\n";
25
26 for (unsigned Idx = 0, Size = Passes.size(); Idx != Size; ++Idx) {
27 if (DebugPM)
28 dbgs() << "Running CGSCC pass: " << Passes[Idx]->name() << "\n";
29
30 PreservedAnalyses PassPA = Passes[Idx]->run(C, AM);
31
32 // If we have an active analysis manager at this level we want to ensure we
33 // update it as each pass runs and potentially invalidates analyses. We
34 // also update the preserved set of analyses based on what analyses we have
35 // already handled the invalidation for here and don't need to invalidate
36 // when finished.
37 if (AM)
38 PassPA = AM->invalidate(C, std::move(PassPA));
39
40 // Finally, we intersect the final preserved analyses to compute the
41 // aggregate preserved set for this pass manager.
42 PA.intersect(std::move(PassPA));
43 }
44
45 if (DebugPM)
46 dbgs() << "Finished CGSCC pass manager run.\n";
47
48 return PA;
49 }
5018
5119 char CGSCCAnalysisManagerModuleProxy::PassID;
5220
1616 cl::opt llvm::detail::DebugPM(
1717 "debug-pass-manager", cl::Hidden,
1818 cl::desc("Print pass management debugging information"));
19
20 PreservedAnalyses ModulePassManager::run(Module &M, ModuleAnalysisManager *AM) {
21 PreservedAnalyses PA = PreservedAnalyses::all();
22
23 if (DebugPM)
24 dbgs() << "Starting module pass manager run.\n";
25
26 for (unsigned Idx = 0, Size = Passes.size(); Idx != Size; ++Idx) {
27 if (DebugPM)
28 dbgs() << "Running module pass: " << Passes[Idx]->name() << "\n";
29
30 PreservedAnalyses PassPA = Passes[Idx]->run(M, AM);
31
32 // If we have an active analysis manager at this level we want to ensure we
33 // update it as each pass runs and potentially invalidates analyses. We
34 // also update the preserved set of analyses based on what analyses we have
35 // already handled the invalidation for here and don't need to invalidate
36 // when finished.
37 if (AM)
38 PassPA = AM->invalidate(M, std::move(PassPA));
39
40 // Finally, we intersect the final preserved analyses to compute the
41 // aggregate preserved set for this pass manager.
42 PA.intersect(std::move(PassPA));
43
44 M.getContext().yield();
45 }
46
47 if (DebugPM)
48 dbgs() << "Finished module pass manager run.\n";
49
50 return PA;
51 }
52
53 PreservedAnalyses FunctionPassManager::run(Function &F,
54 FunctionAnalysisManager *AM) {
55 PreservedAnalyses PA = PreservedAnalyses::all();
56
57 if (DebugPM)
58 dbgs() << "Starting function pass manager run.\n";
59
60 for (unsigned Idx = 0, Size = Passes.size(); Idx != Size; ++Idx) {
61 if (DebugPM)
62 dbgs() << "Running function pass: " << Passes[Idx]->name() << "\n";
63
64 PreservedAnalyses PassPA = Passes[Idx]->run(F, AM);
65
66 // If we have an active analysis manager at this level we want to ensure we
67 // update it as each pass runs and potentially invalidates analyses. We
68 // also update the preserved set of analyses based on what analyses we have
69 // already handled the invalidation for here and don't need to invalidate
70 // when finished.
71 if (AM)
72 PassPA = AM->invalidate(F, std::move(PassPA));
73
74 // Finally, we intersect the final preserved analyses to compute the
75 // aggregate preserved set for this pass manager.
76 PA.intersect(std::move(PassPA));
77
78 F.getContext().yield();
79 }
80
81 if (DebugPM)
82 dbgs() << "Finished function pass manager run.\n";
83
84 return PA;
85 }
8619
8720 char FunctionAnalysisManagerModuleProxy::PassID;
8821
77 ; RUN: opt -disable-output -disable-verify -debug-pass-manager -debug-cgscc-pass-manager \
88 ; RUN: -passes=no-op-module %s 2>&1 \
99 ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PASS
10 ; CHECK-MODULE-PASS: Starting module pass manager
11 ; CHECK-MODULE-PASS-NEXT: Running module pass: NoOpModulePass
12 ; CHECK-MODULE-PASS-NEXT: Finished module pass manager run.
10 ; CHECK-MODULE-PASS: Starting pass manager
11 ; CHECK-MODULE-PASS-NEXT: Running pass: NoOpModulePass
12 ; CHECK-MODULE-PASS-NEXT: Finished pass manager
1313
1414 ; RUN: opt -disable-output -disable-verify -debug-pass-manager -debug-cgscc-pass-manager \
1515 ; RUN: -passes=no-op-cgscc %s 2>&1 \
1717 ; RUN: opt -disable-output -disable-verify -debug-pass-manager -debug-cgscc-pass-manager \
1818 ; RUN: -passes='cgscc(no-op-cgscc)' %s 2>&1 \
1919 ; RUN: | FileCheck %s --check-prefix=CHECK-CGSCC-PASS
20 ; CHECK-CGSCC-PASS: Starting module pass manager
21 ; CHECK-CGSCC-PASS-NEXT: Running module pass: ModuleToPostOrderCGSCCPassAdaptor
20 ; CHECK-CGSCC-PASS: Starting pass manager
21 ; CHECK-CGSCC-PASS-NEXT: Running pass: ModuleToPostOrderCGSCCPassAdaptor
2222 ; CHECK-CGSCC-PASS-NEXT: Running analysis: CGSCCAnalysisManagerModuleProxy
2323 ; CHECK-CGSCC-PASS-NEXT: Running analysis: Lazy CallGraph Analysis
24 ; CHECK-CGSCC-PASS-NEXT: Starting CGSCC pass manager run.
25 ; CHECK-CGSCC-PASS-NEXT: Running CGSCC pass: NoOpCGSCCPass
26 ; CHECK-CGSCC-PASS-NEXT: Finished CGSCC pass manager run.
27 ; CHECK-CGSCC-PASS-NEXT: Finished module pass manager run.
24 ; CHECK-CGSCC-PASS-NEXT: Starting pass manager
25 ; CHECK-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
26 ; CHECK-CGSCC-PASS-NEXT: Finished pass manager
27 ; CHECK-CGSCC-PASS-NEXT: Finished pass manager
2828
2929 ; RUN: opt -disable-output -disable-verify -debug-pass-manager -debug-cgscc-pass-manager \
3030 ; RUN: -passes=no-op-function %s 2>&1 \
3232 ; RUN: opt -disable-output -disable-verify -debug-pass-manager -debug-cgscc-pass-manager \
3333 ; RUN: -passes='function(no-op-function)' %s 2>&1 \
3434 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS
35 ; CHECK-FUNCTION-PASS: Starting module pass manager
36 ; CHECK-FUNCTION-PASS-NEXT: Running module pass: ModuleToFunctionPassAdaptor
35 ; CHECK-FUNCTION-PASS: Starting pass manager
36 ; CHECK-FUNCTION-PASS-NEXT: Running pass: ModuleToFunctionPassAdaptor
3737 ; CHECK-FUNCTION-PASS-NEXT: Running analysis: FunctionAnalysisManagerModuleProxy
38 ; CHECK-FUNCTION-PASS-NEXT: Starting function pass manager run.
39 ; CHECK-FUNCTION-PASS-NEXT: Running function pass: NoOpFunctionPass
40 ; CHECK-FUNCTION-PASS-NEXT: Finished function pass manager run.
41 ; CHECK-FUNCTION-PASS-NEXT: Finished module pass manager run.
38 ; CHECK-FUNCTION-PASS-NEXT: Starting pass manager
39 ; CHECK-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
40 ; CHECK-FUNCTION-PASS-NEXT: Finished pass manager
41 ; CHECK-FUNCTION-PASS-NEXT: Finished pass manager
4242
4343 ; RUN: opt -disable-output -debug-pass-manager -passes=print %s 2>&1 \
4444 ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PRINT
45 ; CHECK-MODULE-PRINT: Starting module pass manager
46 ; CHECK-MODULE-PRINT: Running module pass: VerifierPass
47 ; CHECK-MODULE-PRINT: Running module pass: PrintModulePass
45 ; CHECK-MODULE-PRINT: Starting pass manager
46 ; CHECK-MODULE-PRINT: Running pass: VerifierPass
47 ; CHECK-MODULE-PRINT: Running pass: PrintModulePass
4848 ; CHECK-MODULE-PRINT: ModuleID
4949 ; CHECK-MODULE-PRINT: define void @foo()
50 ; CHECK-MODULE-PRINT: Running module pass: VerifierPass
51 ; CHECK-MODULE-PRINT: Finished module pass manager
50 ; CHECK-MODULE-PRINT: Running pass: VerifierPass
51 ; CHECK-MODULE-PRINT: Finished pass manager
5252
5353 ; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='print,verify' %s 2>&1 \
5454 ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-VERIFY
55 ; CHECK-MODULE-VERIFY: Starting module pass manager
56 ; CHECK-MODULE-VERIFY: Running module pass: PrintModulePass
55 ; CHECK-MODULE-VERIFY: Starting pass manager
56 ; CHECK-MODULE-VERIFY: Running pass: PrintModulePass
5757 ; CHECK-MODULE-VERIFY: ModuleID
5858 ; CHECK-MODULE-VERIFY: define void @foo()
59 ; CHECK-MODULE-VERIFY: Running module pass: VerifierPass
60 ; CHECK-MODULE-VERIFY: Finished module pass manager
59 ; CHECK-MODULE-VERIFY: Running pass: VerifierPass
60 ; CHECK-MODULE-VERIFY: Finished pass manager
6161
6262 ; RUN: opt -disable-output -debug-pass-manager -passes='function(print)' %s 2>&1 \
6363 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PRINT
64 ; CHECK-FUNCTION-PRINT: Starting module pass manager
65 ; CHECK-FUNCTION-PRINT: Running module pass: VerifierPass
66 ; CHECK-FUNCTION-PRINT: Running module pass: ModuleToFunctionPassAdaptor
64 ; CHECK-FUNCTION-PRINT: Starting pass manager
65 ; CHECK-FUNCTION-PRINT: Running pass: VerifierPass
66 ; CHECK-FUNCTION-PRINT: Running pass: ModuleToFunctionPassAdaptor
6767 ; CHECK-FUNCTION-PRINT: Running analysis: FunctionAnalysisManagerModuleProxy
68 ; CHECK-FUNCTION-PRINT: Starting function pass manager
69 ; CHECK-FUNCTION-PRINT: Running function pass: PrintFunctionPass
68 ; CHECK-FUNCTION-PRINT: Starting pass manager
69 ; CHECK-FUNCTION-PRINT: Running pass: PrintFunctionPass
7070 ; CHECK-FUNCTION-PRINT-NOT: ModuleID
7171 ; CHECK-FUNCTION-PRINT: define void @foo()
72 ; CHECK-FUNCTION-PRINT: Finished function pass manager
73 ; CHECK-FUNCTION-PRINT: Running module pass: VerifierPass
74 ; CHECK-FUNCTION-PRINT: Finished module pass manager
72 ; CHECK-FUNCTION-PRINT: Finished pass manager
73 ; CHECK-FUNCTION-PRINT: Running pass: VerifierPass
74 ; CHECK-FUNCTION-PRINT: Finished pass manager
7575
7676 ; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='function(print,verify)' %s 2>&1 \
7777 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-VERIFY
78 ; CHECK-FUNCTION-VERIFY: Starting module pass manager
79 ; CHECK-FUNCTION-VERIFY: Starting function pass manager
80 ; CHECK-FUNCTION-VERIFY: Running function pass: PrintFunctionPass
78 ; CHECK-FUNCTION-VERIFY: Starting pass manager
79 ; CHECK-FUNCTION-VERIFY: Starting pass manager
80 ; CHECK-FUNCTION-VERIFY: Running pass: PrintFunctionPass
8181 ; CHECK-FUNCTION-VERIFY-NOT: ModuleID
8282 ; CHECK-FUNCTION-VERIFY: define void @foo()
83 ; CHECK-FUNCTION-VERIFY: Running function pass: VerifierPass
84 ; CHECK-FUNCTION-VERIFY: Finished function pass manager
85 ; CHECK-FUNCTION-VERIFY: Finished module pass manager
83 ; CHECK-FUNCTION-VERIFY: Running pass: VerifierPass
84 ; CHECK-FUNCTION-VERIFY: Finished pass manager
85 ; CHECK-FUNCTION-VERIFY: Finished pass manager
8686
8787 ; RUN: opt -S -o - -passes='no-op-module,no-op-module' %s \
8888 ; RUN: | FileCheck %s --check-prefix=CHECK-NOOP
9797
9898 ; RUN: opt -disable-output -debug-pass-manager -verify-each -passes='no-op-module,function(no-op-function)' %s 2>&1 \
9999 ; RUN: | FileCheck %s --check-prefix=CHECK-VERIFY-EACH
100 ; CHECK-VERIFY-EACH: Starting module pass manager
101 ; CHECK-VERIFY-EACH: Running module pass: VerifierPass
102 ; CHECK-VERIFY-EACH: Running module pass: NoOpModulePass
103 ; CHECK-VERIFY-EACH: Running module pass: VerifierPass
104 ; CHECK-VERIFY-EACH: Starting function pass manager
105 ; CHECK-VERIFY-EACH: Running function pass: NoOpFunctionPass
106 ; CHECK-VERIFY-EACH: Running function pass: VerifierPass
107 ; CHECK-VERIFY-EACH: Finished function pass manager
108 ; CHECK-VERIFY-EACH: Running module pass: VerifierPass
109 ; CHECK-VERIFY-EACH: Finished module pass manager
100 ; CHECK-VERIFY-EACH: Starting pass manager
101 ; CHECK-VERIFY-EACH: Running pass: VerifierPass
102 ; CHECK-VERIFY-EACH: Running pass: NoOpModulePass
103 ; CHECK-VERIFY-EACH: Running pass: VerifierPass
104 ; CHECK-VERIFY-EACH: Starting pass manager
105 ; CHECK-VERIFY-EACH: Running pass: NoOpFunctionPass
106 ; CHECK-VERIFY-EACH: Running pass: VerifierPass
107 ; CHECK-VERIFY-EACH: Finished pass manager
108 ; CHECK-VERIFY-EACH: Running pass: VerifierPass
109 ; CHECK-VERIFY-EACH: Finished pass manager
110110
111111 ; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='no-op-module,function(no-op-function)' %s 2>&1 \
112112 ; RUN: | FileCheck %s --check-prefix=CHECK-NO-VERIFY
113 ; CHECK-NO-VERIFY: Starting module pass manager
114 ; CHECK-NO-VERIFY-NOT: VerifierPass
115 ; CHECK-NO-VERIFY: Running module pass: NoOpModulePass
116 ; CHECK-NO-VERIFY-NOT: VerifierPass
117 ; CHECK-NO-VERIFY: Starting function pass manager
118 ; CHECK-NO-VERIFY: Running function pass: NoOpFunctionPass
119 ; CHECK-NO-VERIFY-NOT: VerifierPass
120 ; CHECK-NO-VERIFY: Finished function pass manager
121 ; CHECK-NO-VERIFY-NOT: VerifierPass
122 ; CHECK-NO-VERIFY: Finished module pass manager
113 ; CHECK-NO-VERIFY: Starting pass manager
114 ; CHECK-NO-VERIFY-NOT: VerifierPass
115 ; CHECK-NO-VERIFY: Running pass: NoOpModulePass
116 ; CHECK-NO-VERIFY-NOT: VerifierPass
117 ; CHECK-NO-VERIFY: Starting pass manager
118 ; CHECK-NO-VERIFY: Running pass: NoOpFunctionPass
119 ; CHECK-NO-VERIFY-NOT: VerifierPass
120 ; CHECK-NO-VERIFY: Finished pass manager
121 ; CHECK-NO-VERIFY-NOT: VerifierPass
122 ; CHECK-NO-VERIFY: Finished pass manager
123123
124124 ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-pass-manager \
125125 ; RUN: -passes='require,cgscc(require,function(require))' %s 2>&1 \
126126 ; RUN: | FileCheck %s --check-prefix=CHECK-ANALYSES
127 ; CHECK-ANALYSES: Starting module pass manager
128 ; CHECK-ANALYSES: Running module pass: RequireAnalysisPass
127 ; CHECK-ANALYSES: Starting pass manager
128 ; CHECK-ANALYSES: Running pass: RequireAnalysisPass
129129 ; CHECK-ANALYSES: Running analysis: NoOpModuleAnalysis
130 ; CHECK-ANALYSES: Starting CGSCC pass manager
131 ; CHECK-ANALYSES: Running CGSCC pass: RequireAnalysisPass
130 ; CHECK-ANALYSES: Starting pass manager
131 ; CHECK-ANALYSES: Running pass: RequireAnalysisPass
132132 ; CHECK-ANALYSES: Running analysis: NoOpCGSCCAnalysis
133 ; CHECK-ANALYSES: Starting function pass manager
134 ; CHECK-ANALYSES: Running function pass: RequireAnalysisPass
133 ; CHECK-ANALYSES: Starting pass manager
134 ; CHECK-ANALYSES: Running pass: RequireAnalysisPass
135135 ; CHECK-ANALYSES: Running analysis: NoOpFunctionAnalysis
136136
137137 ; Make sure no-op passes that preserve all analyses don't even try to do any
139139 ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-pass-manager \
140140 ; RUN: -passes='require,cgscc(require,function(require))' %s 2>&1 \
141141 ; RUN: | FileCheck %s --check-prefix=CHECK-NO-OP-INVALIDATION
142 ; CHECK-NO-OP-INVALIDATION: Starting module pass manager
142 ; CHECK-NO-OP-INVALIDATION: Starting pass manager
143143 ; CHECK-NO-OP-INVALIDATION-NOT: Invalidating all non-preserved analyses
144144
145145 ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-pass-manager \
146146 ; RUN: -passes='require,require,require' %s 2>&1 \
147147 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS
148 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Starting module pass manager
149 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running module pass: RequireAnalysisPass
148 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Starting pass manager
149 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
150150 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
151151 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS-NOT: Running analysis: NoOpModuleAnalysis
152152
153153 ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-pass-manager \
154154 ; RUN: -passes='require,invalidate,require' %s 2>&1 \
155155 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS
156 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Starting module pass manager
157 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running module pass: RequireAnalysisPass
156 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Starting pass manager
157 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
158158 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
159159 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Invalidating analysis: NoOpModuleAnalysis
160160 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
162162 ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-pass-manager \
163163 ; RUN: -passes='cgscc(require,require,require)' %s 2>&1 \
164164 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS
165 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Starting CGSCC pass manager
166 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running CGSCC pass: RequireAnalysisPass
165 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Starting pass manager
166 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
167167 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
168168 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS-NOT: Running analysis: NoOpCGSCCAnalysis
169169
170170 ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-pass-manager \
171171 ; RUN: -passes='cgscc(require,invalidate,require)' %s 2>&1 \
172172 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS
173 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Starting CGSCC pass manager
174 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running CGSCC pass: RequireAnalysisPass
173 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Starting pass manager
174 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
175175 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
176176 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Invalidating analysis: NoOpCGSCCAnalysis
177177 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
179179 ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-pass-manager \
180180 ; RUN: -passes='function(require,require,require)' %s 2>&1 \
181181 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS
182 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Starting function pass manager
183 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running function pass: RequireAnalysisPass
182 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Starting pass manager
183 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
184184 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
185185 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS-NOT: Running analysis: NoOpFunctionAnalysis
186186
187187 ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-pass-manager \
188188 ; RUN: -passes='function(require,invalidate,require)' %s 2>&1 \
189189 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS
190 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Starting function pass manager
191 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running function pass: RequireAnalysisPass
190 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Starting pass manager
191 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
192192 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
193193 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Invalidating analysis: NoOpFunctionAnalysis
194194 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
196196 ; RUN: opt -disable-output -disable-verify -debug-pass-manager -debug-cgscc-pass-manager \
197197 ; RUN: -passes='require,module(require,function(require,invalidate,require),require),require' %s 2>&1 \
198198 ; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL
199 ; CHECK-INVALIDATE-ALL: Starting module pass manager run.
200 ; CHECK-INVALIDATE-ALL: Running module pass: RequireAnalysisPass
199 ; CHECK-INVALIDATE-ALL: Starting pass manager
200 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
201201 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis
202 ; CHECK-INVALIDATE-ALL: Starting module pass manager run.
203 ; CHECK-INVALIDATE-ALL: Running module pass: RequireAnalysisPass
202 ; CHECK-INVALIDATE-ALL: Starting pass manager
203 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
204204 ; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis
205 ; CHECK-INVALIDATE-ALL: Starting function pass manager run.
206 ; CHECK-INVALIDATE-ALL: Running function pass: RequireAnalysisPass
205 ; CHECK-INVALIDATE-ALL: Starting pass manager
206 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
207207 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis
208 ; CHECK-INVALIDATE-ALL: Running function pass: InvalidateAllAnalysesPass
208 ; CHECK-INVALIDATE-ALL: Running pass: InvalidateAllAnalysesPass
209209 ; CHECK-INVALIDATE-ALL: Invalidating all non-preserved analyses
210210 ; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpFunctionAnalysis
211 ; CHECK-INVALIDATE-ALL: Running function pass: RequireAnalysisPass
211 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
212212 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis
213 ; CHECK-INVALIDATE-ALL: Finished function pass manager run.
213 ; CHECK-INVALIDATE-ALL: Finished pass manager
214214 ; CHECK-INVALIDATE-ALL: Invalidating all non-preserved analyses
215215 ; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpFunctionAnalysis
216216 ; CHECK-INVALIDATE-ALL: Invalidating all non-preserved analyses
217217 ; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpModuleAnalysis
218 ; CHECK-INVALIDATE-ALL: Running module pass: RequireAnalysisPass
218 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
219219 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis
220 ; CHECK-INVALIDATE-ALL: Finished module pass manager run.
220 ; CHECK-INVALIDATE-ALL: Finished pass manager
221221 ; CHECK-INVALIDATE-ALL: Invalidating all non-preserved analyses
222222 ; CHECK-INVALIDATE-ALL-NOT: Invalidating analysis: NoOpModuleAnalysis
223 ; CHECK-INVALIDATE-ALL: Running module pass: RequireAnalysisPass
223 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
224224 ; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis
225 ; CHECK-INVALIDATE-ALL: Finished module pass manager run.
225 ; CHECK-INVALIDATE-ALL: Finished pass manager
226226
227227 ; RUN: opt -disable-output -disable-verify -debug-pass-manager -debug-cgscc-pass-manager \
228228 ; RUN: -passes='require,module(require,cgscc(require,function(require,invalidate,require),require),require),require' %s 2>&1 \
229229 ; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL-CG
230 ; CHECK-INVALIDATE-ALL-CG: Starting module pass manager run.
231 ; CHECK-INVALIDATE-ALL-CG: Running module pass: RequireAnalysisPass
230 ; CHECK-INVALIDATE-ALL-CG: Starting pass manager
231 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
232232 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis
233 ; CHECK-INVALIDATE-ALL-CG: Starting module pass manager run.
234 ; CHECK-INVALIDATE-ALL-CG: Running module pass: RequireAnalysisPass
233 ; CHECK-INVALIDATE-ALL-CG: Starting pass manager
234 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
235235 ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis
236 ; CHECK-INVALIDATE-ALL-CG: Starting CGSCC pass manager run.
237 ; CHECK-INVALIDATE-ALL-CG: Running CGSCC pass: RequireAnalysisPass
236 ; CHECK-INVALIDATE-ALL-CG: Starting pass manager
237 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
238238 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis
239 ; CHECK-INVALIDATE-ALL-CG: Starting function pass manager run.
240 ; CHECK-INVALIDATE-ALL-CG: Running function pass: RequireAnalysisPass
239 ; CHECK-INVALIDATE-ALL-CG: Starting pass manager
240 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
241241 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis
242 ; CHECK-INVALIDATE-ALL-CG: Running function pass: InvalidateAllAnalysesPass
242 ; CHECK-INVALIDATE-ALL-CG: Running pass: InvalidateAllAnalysesPass
243243 ; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses
244244 ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpFunctionAnalysis
245 ; CHECK-INVALIDATE-ALL-CG: Running function pass: RequireAnalysisPass
245 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
246246 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis
247 ; CHECK-INVALIDATE-ALL-CG: Finished function pass manager run.
247 ; CHECK-INVALIDATE-ALL-CG: Finished pass manager
248248 ; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses
249249 ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpFunctionAnalysis
250250 ; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses
251251 ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpCGSCCAnalysis
252 ; CHECK-INVALIDATE-ALL-CG: Running CGSCC pass: RequireAnalysisPass
252 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
253253 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis
254 ; CHECK-INVALIDATE-ALL-CG: Finished CGSCC pass manager run.
254 ; CHECK-INVALIDATE-ALL-CG: Finished pass manager
255255 ; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses
256256 ; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpCGSCCAnalysis
257257 ; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses
258258 ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpModuleAnalysis
259 ; CHECK-INVALIDATE-ALL-CG: Running module pass: RequireAnalysisPass
259 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
260260 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis
261 ; CHECK-INVALIDATE-ALL-CG: Finished module pass manager run.
261 ; CHECK-INVALIDATE-ALL-CG: Finished pass manager
262262 ; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses
263263 ; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpModuleAnalysis
264 ; CHECK-INVALIDATE-ALL-CG: Running module pass: RequireAnalysisPass
264 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
265265 ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis
266 ; CHECK-INVALIDATE-ALL-CG: Finished module pass manager run.
266 ; CHECK-INVALIDATE-ALL-CG: Finished pass manager
267267
268268 define void @foo() {
269269 ret void
0 ; RUN: opt -disable-output -debug-pass-manager \
11 ; RUN: -passes=no-op-module,no-op-module %s 2>&1 \
22 ; RUN: | FileCheck %s --check-prefix=CHECK-TWO-NOOP-MP
3 ; CHECK-TWO-NOOP-MP: Starting module pass manager
4 ; CHECK-TWO-NOOP-MP: Running module pass: NoOpModulePass
5 ; CHECK-TWO-NOOP-MP: Running module pass: NoOpModulePass
6 ; CHECK-TWO-NOOP-MP: Finished module pass manager
3 ; CHECK-TWO-NOOP-MP: Starting pass manager
4 ; CHECK-TWO-NOOP-MP: Running pass: NoOpModulePass
5 ; CHECK-TWO-NOOP-MP: Running pass: NoOpModulePass
6 ; CHECK-TWO-NOOP-MP: Finished pass manager
77
88 ; RUN: opt -disable-output -debug-pass-manager \
99 ; RUN: -passes='module(no-op-module,no-op-module)' %s 2>&1 \
1010 ; RUN: | FileCheck %s --check-prefix=CHECK-NESTED-TWO-NOOP-MP
11 ; CHECK-NESTED-TWO-NOOP-MP: Starting module pass manager
12 ; CHECK-NESTED-TWO-NOOP-MP: Running module pass: ModulePassManager
13 ; CHECK-NESTED-TWO-NOOP-MP: Starting module pass manager
14 ; CHECK-NESTED-TWO-NOOP-MP: Running module pass: NoOpModulePass
15 ; CHECK-NESTED-TWO-NOOP-MP: Running module pass: NoOpModulePass
16 ; CHECK-NESTED-TWO-NOOP-MP: Finished module pass manager
17 ; CHECK-NESTED-TWO-NOOP-MP: Finished module pass manager
11 ; CHECK-NESTED-TWO-NOOP-MP: Starting pass manager
12 ; CHECK-NESTED-TWO-NOOP-MP: Starting pass manager
13 ; CHECK-NESTED-TWO-NOOP-MP: Running pass: NoOpModulePass
14 ; CHECK-NESTED-TWO-NOOP-MP: Running pass: NoOpModulePass
15 ; CHECK-NESTED-TWO-NOOP-MP: Finished pass manager
16 ; CHECK-NESTED-TWO-NOOP-MP: Finished pass manager
1817
1918 ; RUN: opt -disable-output -debug-pass-manager \
2019 ; RUN: -passes=no-op-function,no-op-function %s 2>&1 \
2120 ; RUN: | FileCheck %s --check-prefix=CHECK-TWO-NOOP-FP
22 ; CHECK-TWO-NOOP-FP: Starting module pass manager
23 ; CHECK-TWO-NOOP-FP: Running module pass: ModuleToFunctionPassAdaptor
24 ; CHECK-TWO-NOOP-FP: Starting function pass manager
25 ; CHECK-TWO-NOOP-FP: Running function pass: NoOpFunctionPass
26 ; CHECK-TWO-NOOP-FP: Running function pass: NoOpFunctionPass
27 ; CHECK-TWO-NOOP-FP: Finished function pass manager
28 ; CHECK-TWO-NOOP-FP: Finished module pass manager
21 ; CHECK-TWO-NOOP-FP: Starting pass manager
22 ; CHECK-TWO-NOOP-FP: Running pass: ModuleToFunctionPassAdaptor
23 ; CHECK-TWO-NOOP-FP: Starting pass manager
24 ; CHECK-TWO-NOOP-FP: Running pass: NoOpFunctionPass
25 ; CHECK-TWO-NOOP-FP: Running pass: NoOpFunctionPass
26 ; CHECK-TWO-NOOP-FP: Finished pass manager
27 ; CHECK-TWO-NOOP-FP: Finished pass manager
2928
3029 ; RUN: opt -disable-output -debug-pass-manager \
3130 ; RUN: -passes='function(no-op-function,no-op-function)' %s 2>&1 \
3231 ; RUN: | FileCheck %s --check-prefix=CHECK-NESTED-TWO-NOOP-FP
33 ; CHECK-NESTED-TWO-NOOP-FP: Starting module pass manager
34 ; CHECK-NESTED-TWO-NOOP-FP: Running module pass: ModuleToFunctionPassAdaptor
35 ; CHECK-NESTED-TWO-NOOP-FP: Starting function pass manager
36 ; CHECK-NESTED-TWO-NOOP-FP: Running function pass: NoOpFunctionPass
37 ; CHECK-NESTED-TWO-NOOP-FP: Running function pass: NoOpFunctionPass
38 ; CHECK-NESTED-TWO-NOOP-FP: Finished function pass manager
39 ; CHECK-NESTED-TWO-NOOP-FP: Finished module pass manager
32 ; CHECK-NESTED-TWO-NOOP-FP: Starting pass manager
33 ; CHECK-NESTED-TWO-NOOP-FP: Running pass: ModuleToFunctionPassAdaptor
34 ; CHECK-NESTED-TWO-NOOP-FP: Starting pass manager
35 ; CHECK-NESTED-TWO-NOOP-FP: Running pass: NoOpFunctionPass
36 ; CHECK-NESTED-TWO-NOOP-FP: Running pass: NoOpFunctionPass
37 ; CHECK-NESTED-TWO-NOOP-FP: Finished pass manager
38 ; CHECK-NESTED-TWO-NOOP-FP: Finished pass manager
4039
4140 ; RUN: opt -disable-output -debug-pass-manager \
4241 ; RUN: -passes='no-op-module,function(no-op-function,no-op-function),no-op-module' %s 2>&1 \
4342 ; RUN: | FileCheck %s --check-prefix=CHECK-MIXED-FP-AND-MP
44 ; CHECK-MIXED-FP-AND-MP: Starting module pass manager
45 ; CHECK-MIXED-FP-AND-MP: Running module pass: NoOpModulePass
46 ; CHECK-MIXED-FP-AND-MP: Running module pass: ModuleToFunctionPassAdaptor
47 ; CHECK-MIXED-FP-AND-MP: Starting function pass manager
48 ; CHECK-MIXED-FP-AND-MP: Running function pass: NoOpFunctionPass
49 ; CHECK-MIXED-FP-AND-MP: Running function pass: NoOpFunctionPass
50 ; CHECK-MIXED-FP-AND-MP: Finished function pass manager
51 ; CHECK-MIXED-FP-AND-MP: Running module pass: NoOpModulePass
52 ; CHECK-MIXED-FP-AND-MP: Finished module pass manager
43 ; CHECK-MIXED-FP-AND-MP: Starting pass manager
44 ; CHECK-MIXED-FP-AND-MP: Running pass: NoOpModulePass
45 ; CHECK-MIXED-FP-AND-MP: Running pass: ModuleToFunctionPassAdaptor
46 ; CHECK-MIXED-FP-AND-MP: Starting pass manager
47 ; CHECK-MIXED-FP-AND-MP: Running pass: NoOpFunctionPass
48 ; CHECK-MIXED-FP-AND-MP: Running pass: NoOpFunctionPass
49 ; CHECK-MIXED-FP-AND-MP: Finished pass manager
50 ; CHECK-MIXED-FP-AND-MP: Running pass: NoOpModulePass
51 ; CHECK-MIXED-FP-AND-MP: Finished pass manager
5352
5453 ; RUN: not opt -disable-output -debug-pass-manager \
5554 ; RUN: -passes='no-op-module)' %s 2>&1 \
104103 ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-pass-manager \
105104 ; RUN: -passes=no-op-cgscc,no-op-cgscc %s 2>&1 \
106105 ; RUN: | FileCheck %s --check-prefix=CHECK-TWO-NOOP-CG
107 ; CHECK-TWO-NOOP-CG: Starting module pass manager
108 ; CHECK-TWO-NOOP-CG: Running module pass: ModuleToPostOrderCGSCCPassAdaptor
109 ; CHECK-TWO-NOOP-CG: Starting CGSCC pass manager
110 ; CHECK-TWO-NOOP-CG: Running CGSCC pass: NoOpCGSCCPass
111 ; CHECK-TWO-NOOP-CG: Running CGSCC pass: NoOpCGSCCPass
112 ; CHECK-TWO-NOOP-CG: Finished CGSCC pass manager
113 ; CHECK-TWO-NOOP-CG: Finished module pass manager
106 ; CHECK-TWO-NOOP-CG: Starting pass manager
107 ; CHECK-TWO-NOOP-CG: Running pass: ModuleToPostOrderCGSCCPassAdaptor
108 ; CHECK-TWO-NOOP-CG: Starting pass manager
109 ; CHECK-TWO-NOOP-CG: Running pass: NoOpCGSCCPass
110 ; CHECK-TWO-NOOP-CG: Running pass: NoOpCGSCCPass
111 ; CHECK-TWO-NOOP-CG: Finished pass manager
112 ; CHECK-TWO-NOOP-CG: Finished pass manager
114113
115114 ; RUN: opt -disable-output -debug-pass-manager -debug-cgscc-pass-manager \
116115 ; 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 \
117116 ; RUN: | FileCheck %s --check-prefix=CHECK-NESTED-MP-CG-FP
118 ; CHECK-NESTED-MP-CG-FP: Starting module pass manager
119 ; CHECK-NESTED-MP-CG-FP: Starting module pass manager
120 ; CHECK-NESTED-MP-CG-FP: Running module pass: ModuleToFunctionPassAdaptor
121 ; CHECK-NESTED-MP-CG-FP: Starting function pass manager
122 ; CHECK-NESTED-MP-CG-FP: Running function pass: NoOpFunctionPass
123 ; CHECK-NESTED-MP-CG-FP: Finished function pass manager
124 ; CHECK-NESTED-MP-CG-FP: Running module pass: ModuleToPostOrderCGSCCPassAdaptor
125 ; CHECK-NESTED-MP-CG-FP: Starting CGSCC pass manager
126 ; CHECK-NESTED-MP-CG-FP: Running CGSCC pass: NoOpCGSCCPass
127 ; CHECK-NESTED-MP-CG-FP: Running CGSCC pass: CGSCCToFunctionPassAdaptor
128 ; CHECK-NESTED-MP-CG-FP: Starting function pass manager
129 ; CHECK-NESTED-MP-CG-FP: Running function pass: NoOpFunctionPass
130 ; CHECK-NESTED-MP-CG-FP: Finished function pass manager
131 ; CHECK-NESTED-MP-CG-FP: Running CGSCC pass: NoOpCGSCCPass
132 ; CHECK-NESTED-MP-CG-FP: Finished CGSCC pass manager
133 ; CHECK-NESTED-MP-CG-FP: Running module pass: ModuleToFunctionPassAdaptor
134 ; CHECK-NESTED-MP-CG-FP: Starting function pass manager
135 ; CHECK-NESTED-MP-CG-FP: Running function pass: NoOpFunctionPass
136 ; CHECK-NESTED-MP-CG-FP: Finished function pass manager
137 ; CHECK-NESTED-MP-CG-FP: Finished module pass manager
138 ; CHECK-NESTED-MP-CG-FP: Finished module pass manager
117 ; CHECK-NESTED-MP-CG-FP: Starting pass manager
118 ; CHECK-NESTED-MP-CG-FP: Starting pass manager
119 ; CHECK-NESTED-MP-CG-FP: Running pass: ModuleToFunctionPassAdaptor
120 ; CHECK-NESTED-MP-CG-FP: Starting pass manager
121 ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpFunctionPass
122 ; CHECK-NESTED-MP-CG-FP: Finished pass manager
123 ; CHECK-NESTED-MP-CG-FP: Running pass: ModuleToPostOrderCGSCCPassAdaptor
124 ; CHECK-NESTED-MP-CG-FP: Starting pass manager
125 ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpCGSCCPass
126 ; CHECK-NESTED-MP-CG-FP: Running pass: CGSCCToFunctionPassAdaptor
127 ; CHECK-NESTED-MP-CG-FP: Starting pass manager
128 ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpFunctionPass
129 ; CHECK-NESTED-MP-CG-FP: Finished pass manager
130 ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpCGSCCPass
131 ; CHECK-NESTED-MP-CG-FP: Finished pass manager
132 ; CHECK-NESTED-MP-CG-FP: Running pass: ModuleToFunctionPassAdaptor
133 ; CHECK-NESTED-MP-CG-FP: Starting pass manager
134 ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpFunctionPass
135 ; CHECK-NESTED-MP-CG-FP: Finished pass manager
136 ; CHECK-NESTED-MP-CG-FP: Finished pass manager
137 ; CHECK-NESTED-MP-CG-FP: Finished pass manager
139138
140139 define void @f() {
141140 ret void