1 ; This test is essentially doing very basic things with the opt tool and the
2 ; new pass manager pipeline. It will be used to flesh out the feature
3 ; completeness of the opt tool when the new pass manager is engaged. The tests
4 ; may not be useful once it becomes the default or may get spread out into other
5 ; files, but for now this is just going to step the new process through its
8 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
9 ; RUN: -passes=no-op-module %s 2>&1 \
10 ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PASS
11 ; CHECK-MODULE-PASS: Starting llvm::Module pass manager run
12 ; CHECK-MODULE-PASS-NEXT: Running pass: NoOpModulePass
13 ; CHECK-MODULE-PASS-NEXT: Finished llvm::Module pass manager run
15 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
16 ; RUN: -passes=no-op-cgscc %s 2>&1 \
17 ; RUN: | FileCheck %s --check-prefix=CHECK-CGSCC-PASS
18 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
19 ; RUN: -passes='cgscc(no-op-cgscc)' %s 2>&1 \
20 ; RUN: | FileCheck %s --check-prefix=CHECK-CGSCC-PASS
21 ; CHECK-CGSCC-PASS: Starting llvm::Module pass manager run
22 ; CHECK-CGSCC-PASS-NEXT: Running pass: ModuleToPostOrderCGSCCPassAdaptor
23 ; CHECK-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}}>
24 ; CHECK-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(FunctionAnalysisManager|AnalysisManager<.*Function.*>).*}}>
25 ; CHECK-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis
26 ; CHECK-CGSCC-PASS-NEXT: Running an SCC pass across the RefSCC: [(foo)]
27 ; CHECK-CGSCC-PASS-NEXT: Starting CGSCC pass manager run
28 ; CHECK-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
29 ; CHECK-CGSCC-PASS-NEXT: Finished CGSCC pass manager run
30 ; CHECK-CGSCC-PASS-NEXT: Finished llvm::Module pass manager run
32 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
33 ; RUN: -passes=no-op-function %s 2>&1 \
34 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS
35 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
36 ; RUN: -passes='function(no-op-function)' %s 2>&1 \
37 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS
38 ; CHECK-FUNCTION-PASS: Starting llvm::Module pass manager run
39 ; CHECK-FUNCTION-PASS-NEXT: Running pass: ModuleToFunctionPassAdaptor
40 ; CHECK-FUNCTION-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
41 ; CHECK-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run
42 ; CHECK-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
43 ; CHECK-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run
44 ; CHECK-FUNCTION-PASS-NEXT: Finished llvm::Module pass manager run
46 ; RUN: opt -disable-output -debug-pass-manager -passes=print %s 2>&1 \
47 ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PRINT
48 ; CHECK-MODULE-PRINT: Starting llvm::Module pass manager run
49 ; CHECK-MODULE-PRINT: Running pass: VerifierPass
50 ; CHECK-MODULE-PRINT: Running pass: PrintModulePass
51 ; CHECK-MODULE-PRINT: ModuleID
52 ; CHECK-MODULE-PRINT: define void @foo(i1 %x)
53 ; CHECK-MODULE-PRINT: Running pass: VerifierPass
54 ; CHECK-MODULE-PRINT: Finished llvm::Module pass manager run
56 ; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='print,verify' %s 2>&1 \
57 ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-VERIFY
58 ; CHECK-MODULE-VERIFY: Starting llvm::Module pass manager run
59 ; CHECK-MODULE-VERIFY: Running pass: PrintModulePass
60 ; CHECK-MODULE-VERIFY: ModuleID
61 ; CHECK-MODULE-VERIFY: define void @foo(i1 %x)
62 ; CHECK-MODULE-VERIFY: Running pass: VerifierPass
63 ; CHECK-MODULE-VERIFY: Finished llvm::Module pass manager run
65 ; RUN: opt -disable-output -debug-pass-manager -passes='function(print)' %s 2>&1 \
66 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PRINT
67 ; CHECK-FUNCTION-PRINT: Starting llvm::Module pass manager run
68 ; CHECK-FUNCTION-PRINT: Running pass: VerifierPass
69 ; CHECK-FUNCTION-PRINT: Running pass: ModuleToFunctionPassAdaptor
70 ; CHECK-FUNCTION-PRINT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
71 ; CHECK-FUNCTION-PRINT: Starting llvm::Function pass manager run
72 ; CHECK-FUNCTION-PRINT: Running pass: PrintFunctionPass
73 ; CHECK-FUNCTION-PRINT-NOT: ModuleID
74 ; CHECK-FUNCTION-PRINT: define void @foo(i1 %x)
75 ; CHECK-FUNCTION-PRINT: Finished llvm::Function pass manager run
76 ; CHECK-FUNCTION-PRINT: Running pass: VerifierPass
77 ; CHECK-FUNCTION-PRINT: Finished llvm::Module pass manager run
79 ; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='function(print,verify)' %s 2>&1 \
80 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-VERIFY
81 ; CHECK-FUNCTION-VERIFY: Starting llvm::Module pass manager run
82 ; CHECK-FUNCTION-VERIFY: Starting llvm::Function pass manager run
83 ; CHECK-FUNCTION-VERIFY: Running pass: PrintFunctionPass
84 ; CHECK-FUNCTION-VERIFY-NOT: ModuleID
85 ; CHECK-FUNCTION-VERIFY: define void @foo(i1 %x)
86 ; CHECK-FUNCTION-VERIFY: Running pass: VerifierPass
87 ; CHECK-FUNCTION-VERIFY: Finished llvm::Function pass manager run
88 ; CHECK-FUNCTION-VERIFY: Finished llvm::Module pass manager run
90 ; RUN: opt -S -o - -passes='no-op-module,no-op-module' %s \
91 ; RUN: | FileCheck %s --check-prefix=CHECK-NOOP
92 ; CHECK-NOOP: define void @foo(i1 %x) {
94 ; CHECK-NOOP: br i1 %x, label %loop, label %exit
96 ; CHECK-NOOP: br label %loop
98 ; CHECK-NOOP: ret void
101 ; Round trip through bitcode.
102 ; RUN: opt -f -o - -passes='no-op-module,no-op-module' %s \
104 ; RUN: | FileCheck %s --check-prefix=CHECK-NOOP
106 ; RUN: opt -disable-output -debug-pass-manager -verify-each -passes='no-op-module,function(no-op-function)' %s 2>&1 \
107 ; RUN: | FileCheck %s --check-prefix=CHECK-VERIFY-EACH
108 ; CHECK-VERIFY-EACH: Starting llvm::Module pass manager run
109 ; CHECK-VERIFY-EACH: Running pass: VerifierPass
110 ; CHECK-VERIFY-EACH: Running pass: NoOpModulePass
111 ; CHECK-VERIFY-EACH: Running pass: VerifierPass
112 ; CHECK-VERIFY-EACH: Starting llvm::Function pass manager run
113 ; CHECK-VERIFY-EACH: Running pass: NoOpFunctionPass
114 ; CHECK-VERIFY-EACH: Running pass: VerifierPass
115 ; CHECK-VERIFY-EACH: Finished llvm::Function pass manager run
116 ; CHECK-VERIFY-EACH: Running pass: VerifierPass
117 ; CHECK-VERIFY-EACH: Finished llvm::Module pass manager run
119 ; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='no-op-module,function(no-op-function)' %s 2>&1 \
120 ; RUN: | FileCheck %s --check-prefix=CHECK-NO-VERIFY
121 ; CHECK-NO-VERIFY: Starting llvm::Module pass manager run
122 ; CHECK-NO-VERIFY-NOT: VerifierPass
123 ; CHECK-NO-VERIFY: Running pass: NoOpModulePass
124 ; CHECK-NO-VERIFY-NOT: VerifierPass
125 ; CHECK-NO-VERIFY: Starting llvm::Function pass manager run
126 ; CHECK-NO-VERIFY: Running pass: NoOpFunctionPass
127 ; CHECK-NO-VERIFY-NOT: VerifierPass
128 ; CHECK-NO-VERIFY: Finished llvm::Function pass manager run
129 ; CHECK-NO-VERIFY-NOT: VerifierPass
130 ; CHECK-NO-VERIFY: Finished llvm::Module pass manager run
132 ; RUN: opt -disable-output -debug-pass-manager \
133 ; RUN: -passes='require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>))' %s 2>&1 \
134 ; RUN: | FileCheck %s --check-prefix=CHECK-ANALYSES
135 ; CHECK-ANALYSES: Starting llvm::Module pass manager run
136 ; CHECK-ANALYSES: Running pass: RequireAnalysisPass
137 ; CHECK-ANALYSES: Running analysis: NoOpModuleAnalysis
138 ; CHECK-ANALYSES: Starting CGSCC pass manager run
139 ; CHECK-ANALYSES: Running pass: RequireAnalysisPass
140 ; CHECK-ANALYSES: Running analysis: NoOpCGSCCAnalysis
141 ; CHECK-ANALYSES: Starting llvm::Function pass manager run
142 ; CHECK-ANALYSES: Running pass: RequireAnalysisPass
143 ; CHECK-ANALYSES: Running analysis: NoOpFunctionAnalysis
145 ; Make sure no-op passes that preserve all analyses don't even try to do any
146 ; analysis invalidation.
147 ; RUN: opt -disable-output -debug-pass-manager \
148 ; RUN: -passes='require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>))' %s 2>&1 \
149 ; RUN: | FileCheck %s --check-prefix=CHECK-NO-OP-INVALIDATION
150 ; CHECK-NO-OP-INVALIDATION: Starting llvm::Module pass manager run
151 ; CHECK-NO-OP-INVALIDATION-NOT: Invalidating all non-preserved analyses
153 ; RUN: opt -disable-output -debug-pass-manager \
154 ; RUN: -passes='require<no-op-module>,require<no-op-module>,require<no-op-module>' %s 2>&1 \
155 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS
156 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
157 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
158 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
159 ; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS-NOT: Running analysis: NoOpModuleAnalysis
161 ; RUN: opt -disable-output -debug-pass-manager \
162 ; RUN: -passes='require<no-op-module>,invalidate<no-op-module>,require<no-op-module>' %s 2>&1 \
163 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS
164 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
165 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
166 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
167 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Invalidating analysis: NoOpModuleAnalysis
168 ; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
170 ; RUN: opt -disable-output -debug-pass-manager \
171 ; RUN: -passes='cgscc(require<no-op-cgscc>,require<no-op-cgscc>,require<no-op-cgscc>)' %s 2>&1 \
172 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS
173 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
174 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
175 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
176 ; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS-NOT: Running analysis: NoOpCGSCCAnalysis
178 ; RUN: opt -disable-output -debug-pass-manager \
179 ; RUN: -passes='cgscc(require<no-op-cgscc>,invalidate<no-op-cgscc>,require<no-op-cgscc>)' %s 2>&1 \
180 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS
181 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
182 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
183 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
184 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Invalidating analysis: NoOpCGSCCAnalysis
185 ; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
187 ; RUN: opt -disable-output -debug-pass-manager \
188 ; RUN: -passes='function(require<no-op-function>,require<no-op-function>,require<no-op-function>)' %s 2>&1 \
189 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS
190 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
191 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
192 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
193 ; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS-NOT: Running analysis: NoOpFunctionAnalysis
195 ; RUN: opt -disable-output -debug-pass-manager \
196 ; RUN: -passes='function(require<no-op-function>,invalidate<no-op-function>,require<no-op-function>)' %s 2>&1 \
197 ; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS
198 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
199 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
200 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
201 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Invalidating analysis: NoOpFunctionAnalysis
202 ; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
204 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
205 ; RUN: -passes='require<no-op-module>,module(require<no-op-module>,function(require<no-op-function>,invalidate<all>,require<no-op-function>),require<no-op-module>),require<no-op-module>' %s 2>&1 \
206 ; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL
207 ; CHECK-INVALIDATE-ALL: Starting llvm::Module pass manager run
208 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
209 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis
210 ; CHECK-INVALIDATE-ALL: Starting llvm::Module pass manager run
211 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
212 ; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis
213 ; CHECK-INVALIDATE-ALL: Starting llvm::Function pass manager run
214 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
215 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis
216 ; CHECK-INVALIDATE-ALL: Running pass: InvalidateAllAnalysesPass
217 ; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpFunctionAnalysis
218 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
219 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis
220 ; CHECK-INVALIDATE-ALL: Finished llvm::Function pass manager run
221 ; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpModuleAnalysis
222 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
223 ; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis
224 ; CHECK-INVALIDATE-ALL: Finished llvm::Module pass manager run
225 ; CHECK-INVALIDATE-ALL-NOT: Invalidating analysis: NoOpModuleAnalysis
226 ; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
227 ; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis
228 ; CHECK-INVALIDATE-ALL: Finished llvm::Module pass manager run
230 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
231 ; RUN: -passes='require<no-op-module>,module(require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>,invalidate<all>,require<no-op-function>),require<no-op-cgscc>),require<no-op-module>),require<no-op-module>' %s 2>&1 \
232 ; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL-CG
233 ; CHECK-INVALIDATE-ALL-CG: Starting llvm::Module pass manager run
234 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
235 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis
236 ; CHECK-INVALIDATE-ALL-CG: Starting llvm::Module pass manager run
237 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
238 ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis
239 ; CHECK-INVALIDATE-ALL-CG: Starting CGSCC pass manager run
240 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
241 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis
242 ; CHECK-INVALIDATE-ALL-CG: Starting llvm::Function pass manager run
243 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
244 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis
245 ; CHECK-INVALIDATE-ALL-CG: Running pass: InvalidateAllAnalysesPass
246 ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpFunctionAnalysis
247 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
248 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis
249 ; CHECK-INVALIDATE-ALL-CG: Finished llvm::Function pass manager run
250 ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpFunctionAnalysis
251 ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpCGSCCAnalysis
252 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
253 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis
254 ; CHECK-INVALIDATE-ALL-CG: Finished CGSCC pass manager run
255 ; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpCGSCCAnalysis
256 ; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpModuleAnalysis
257 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
258 ; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis
259 ; CHECK-INVALIDATE-ALL-CG: Finished llvm::Module pass manager run
260 ; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpModuleAnalysis
261 ; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
262 ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis
263 ; CHECK-INVALIDATE-ALL-CG: Finished llvm::Module pass manager run
265 ; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
266 ; RUN: -passes='require<targetlibinfo>,invalidate<all>,require<targetlibinfo>' \
267 ; RUN: | FileCheck %s --check-prefix=CHECK-TLI
268 ; CHECK-TLI: Starting llvm::Module pass manager run
269 ; CHECK-TLI: Running pass: RequireAnalysisPass
270 ; CHECK-TLI: Running analysis: TargetLibraryAnalysis
271 ; CHECK-TLI: Running pass: InvalidateAllAnalysesPass
272 ; CHECK-TLI-NOT: Invalidating analysis: TargetLibraryAnalysis
273 ; CHECK-TLI: Running pass: RequireAnalysisPass
274 ; CHECK-TLI-NOT: Running analysis: TargetLibraryAnalysis
275 ; CHECK-TLI: Finished llvm::Module pass manager run
277 ; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
278 ; RUN: -passes='require<targetir>,invalidate<all>,require<targetir>' \
279 ; RUN: | FileCheck %s --check-prefix=CHECK-TIRA
280 ; CHECK-TIRA: Starting llvm::Module pass manager run
281 ; CHECK-TIRA: Running pass: RequireAnalysisPass
282 ; CHECK-TIRA: Running analysis: TargetIRAnalysis
283 ; CHECK-TIRA: Running pass: InvalidateAllAnalysesPass
284 ; CHECK-TIRA-NOT: Invalidating analysis: TargetIRAnalysis
285 ; CHECK-TIRA: Running pass: RequireAnalysisPass
286 ; CHECK-TIRA-NOT: Running analysis: TargetIRAnalysis
287 ; CHECK-TIRA: Finished llvm::Module pass manager run
289 ; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
290 ; RUN: -passes='require<domtree>' \
291 ; RUN: | FileCheck %s --check-prefix=CHECK-DT
292 ; CHECK-DT: Starting llvm::Module pass manager run
293 ; CHECK-DT: Running pass: RequireAnalysisPass
294 ; CHECK-DT: Running analysis: DominatorTreeAnalysis
295 ; CHECK-DT: Finished llvm::Module pass manager run
297 ; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
298 ; RUN: -passes='require<basic-aa>' \
299 ; RUN: | FileCheck %s --check-prefix=CHECK-BASIC-AA
300 ; CHECK-BASIC-AA: Starting llvm::Module pass manager run
301 ; CHECK-BASIC-AA: Running pass: RequireAnalysisPass
302 ; CHECK-BASIC-AA: Running analysis: BasicAA
303 ; CHECK-BASIC-AA: Finished llvm::Module pass manager run
305 ; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
306 ; RUN: -passes='require<aa>' -aa-pipeline='basic-aa' \
307 ; RUN: | FileCheck %s --check-prefix=CHECK-AA
308 ; CHECK-AA: Starting llvm::Module pass manager run
309 ; CHECK-AA: Running pass: RequireAnalysisPass
310 ; CHECK-AA: Running analysis: AAManager
311 ; CHECK-AA: Running analysis: BasicAA
312 ; CHECK-AA: Finished llvm::Module pass manager run
314 ; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
315 ; RUN: -passes='require<memdep>' \
316 ; RUN: | FileCheck %s --check-prefix=CHECK-MEMDEP
317 ; CHECK-MEMDEP: Starting llvm::Module pass manager run
318 ; CHECK-MEMDEP: Running pass: RequireAnalysisPass
319 ; CHECK-MEMDEP: Running analysis: MemoryDependenceAnalysis
320 ; CHECK-MEMDEP: Finished llvm::Module pass manager run
322 ; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
323 ; RUN: -passes='require<callgraph>' \
324 ; RUN: | FileCheck %s --check-prefix=CHECK-CALLGRAPH
325 ; CHECK-CALLGRAPH: Starting llvm::Module pass manager run
326 ; CHECK-CALLGRAPH: Running pass: RequireAnalysisPass
327 ; CHECK-CALLGRAPH: Running analysis: CallGraphAnalysis
328 ; CHECK-CALLGRAPH: Finished llvm::Module pass manager run
330 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
331 ; RUN: -passes='default<O0>' %s 2>&1 \
332 ; RUN: | FileCheck %s --check-prefix=CHECK-O0
333 ; CHECK-O0: Starting llvm::Module pass manager run
334 ; CHECK-O0-NEXT: Finished llvm::Module pass manager run
336 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
337 ; RUN: -passes='default<O1>' %s 2>&1 \
338 ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O1
339 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
340 ; RUN: -passes='default<O2>' %s 2>&1 \
341 ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O2
342 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
343 ; RUN: -passes='default<Os>' %s 2>&1 \
344 ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-Os
345 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
346 ; RUN: -passes='default<Oz>' %s 2>&1 \
347 ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-Oz
348 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
349 ; RUN: -passes='lto-pre-link<O2>' %s 2>&1 \
350 ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O2
351 ; CHECK-O: Starting llvm::Module pass manager run
352 ; CHECK-O: Starting llvm::Module pass manager run
353 ; CHECK-O: Running pass: ForceFunctionAttrsPass
354 ; CHECK-O: Running pass: InferFunctionAttrsPass
355 ; CHECK-O: Starting llvm::Function pass manager run.
356 ; CHECK-O: Running pass: SimplifyCFGPass
357 ; CHECK-O: Running pass: SROA
358 ; CHECK-O: Running pass: EarlyCSEPass
359 ; CHECK-O: Running pass: LowerExpectIntrinsicPass
360 ; CHECK-O: Running pass: GVNHoistPass
361 ; CHECK-O: Finished llvm::Function pass manager run.
362 ; CHECK-O: Running pass: IPSCCPPass
363 ; CHECK-O: Running pass: GlobalOptPass
364 ; CHECK-O: Running pass: ModuleToFunctionPassAdaptor<{{.*}}PromotePass>
365 ; CHECK-O: Running pass: DeadArgumentEliminationPass
366 ; CHECK-O: Starting llvm::Function pass manager run.
367 ; CHECK-O: Running pass: InstCombinePass
368 ; CHECK-O: Running pass: SimplifyCFGPass
369 ; CHECK-O: Finished llvm::Function pass manager run.
370 ; CHECK-O: Starting CGSCC pass manager run.
371 ; CHECK-O: Starting llvm::Function pass manager run.
372 ; CHECK-O: Running pass: SROA
373 ; CHECK-O: Running pass: EarlyCSEPass
374 ; CHECK-O: Running pass: SpeculativeExecutionPass
375 ; CHECK-O: Running pass: JumpThreadingPass
376 ; CHECK-O: Running pass: CorrelatedValuePropagationPass
377 ; CHECK-O: Running pass: SimplifyCFGPass
378 ; CHECK-O: Running pass: InstCombinePass
379 ; CHECK-O1: Running pass: LibCallsShrinkWrapPass
380 ; CHECK-O2: Running pass: LibCallsShrinkWrapPass
381 ; CHECK-Os-NOT: Running pass: LibCallsShrinkWrapPass
382 ; CHECK-Oz-NOT: Running pass: LibCallsShrinkWrapPass
383 ; CHECK-O: Running pass: TailCallElimPass
384 ; CHECK-O: Running pass: SimplifyCFGPass
385 ; CHECK-O: Running pass: ReassociatePass
386 ; CHECK-O: Starting llvm::Loop pass manager run.
387 ; CHECK-O: Running pass: LoopRotatePass
388 ; CHECK-O: Running pass: LICMPass
389 ; CHECK-O: Finished llvm::Loop pass manager run.
390 ; CHECK-O: Running pass: SimplifyCFGPass
391 ; CHECK-O: Running pass: InstCombinePass
392 ; CHECK-O: Starting llvm::Loop pass manager run.
393 ; CHECK-O: Finished llvm::Loop pass manager run.
394 ; CHECK-O: Running pass: MemCpyOptPass
395 ; CHECK-O: Running pass: SCCPPass
396 ; CHECK-O: Running pass: BDCEPass
397 ; CHECK-O: Running pass: InstCombinePass
398 ; CHECK-O: Running pass: JumpThreadingPass
399 ; CHECK-O: Running pass: CorrelatedValuePropagationPass
400 ; CHECK-O: Running pass: DSEPass
401 ; CHECK-O: Running pass: FunctionToLoopPassAdaptor<{{.*}}LICMPass>
402 ; CHECK-O: Running pass: ADCEPass
403 ; CHECK-O: Running pass: SimplifyCFGPass
404 ; CHECK-O: Running pass: InstCombinePass
405 ; CHECK-O: Finished llvm::Function pass manager run.
406 ; CHECK-O: Finished CGSCC pass manager run.
407 ; CHECK-O: Running pass: EliminateAvailableExternallyPass
408 ; CHECK-O: Running pass: ReversePostOrderFunctionAttrsPass
409 ; CHECK-O: Starting llvm::Function pass manager run.
410 ; CHECK-O: Running pass: Float2IntPass
411 ; CHECK-O: Running pass: LoopDistributePass
412 ; CHECK-O: Running pass: LoopVectorizePass
413 ; CHECK-O: Running pass: InstCombinePass
414 ; CHECK-O: Running pass: SLPVectorizerPass
415 ; CHECK-O: Running pass: SimplifyCFGPass
416 ; CHECK-O: Running pass: InstCombinePass
417 ; CHECK-O: Running pass: AlignmentFromAssumptionsPass
418 ; CHECK-O: Finished llvm::Function pass manager run.
419 ; CHECK-O: Running pass: GlobalDCEPass
420 ; CHECK-O: Running pass: ConstantMergePass
422 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
423 ; RUN: -passes='lto<O2>' %s 2>&1 \
424 ; RUN: | FileCheck %s --check-prefix=CHECK-LTO-O2
425 ; CHECK-LTO-O2: Starting llvm::Module pass manager run
426 ; CHECK-LTO-O2: Running pass: InstCombinePass
427 ; CHECK-LTO-O2: Running pass: SimplifyCFGPass
429 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
430 ; RUN: -passes='repeat<3>(no-op-module)' %s 2>&1 \
431 ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-MODULE-PASS
432 ; CHECK-REPEAT-MODULE-PASS: Starting llvm::Module pass manager run
433 ; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: RepeatedPass
434 ; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run
435 ; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
436 ; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run
437 ; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run
438 ; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
439 ; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run
440 ; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run
441 ; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
442 ; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run
443 ; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run
445 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
446 ; RUN: -passes='cgscc(repeat<3>(no-op-cgscc))' %s 2>&1 \
447 ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-CGSCC-PASS
448 ; CHECK-REPEAT-CGSCC-PASS: Starting llvm::Module pass manager run
449 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: ModuleToPostOrderCGSCCPassAdaptor
450 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}}>
451 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(FunctionAnalysisManager|AnalysisManager<.*Function.*>).*}}>
452 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis
453 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running an SCC pass across the RefSCC: [(foo)]
454 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run
455 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: RepeatedPass
456 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run
457 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
458 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run
459 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run
460 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
461 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run
462 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run
463 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
464 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run
465 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run
466 ; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished llvm::Module pass manager run
468 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
469 ; RUN: -passes='function(repeat<3>(no-op-function))' %s 2>&1 \
470 ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-FUNCTION-PASS
471 ; CHECK-REPEAT-FUNCTION-PASS: Starting llvm::Module pass manager run
472 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: ModuleToFunctionPassAdaptor
473 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
474 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run
475 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: RepeatedPass
476 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run
477 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
478 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run
479 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run
480 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
481 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run
482 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run
483 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
484 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run
485 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run
486 ; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Module pass manager run
488 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \
489 ; RUN: -passes='loop(repeat<3>(no-op-loop))' %s 2>&1 \
490 ; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-LOOP-PASS
491 ; CHECK-REPEAT-LOOP-PASS: Starting llvm::Module pass manager run
492 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: ModuleToFunctionPassAdaptor
493 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
494 ; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Function pass manager run
495 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: FunctionToLoopPassAdaptor
496 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
497 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: LoopAnalysis
498 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: DominatorTreeAnalysis
499 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: AAManager
500 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TargetLibraryAnalysis
501 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: ScalarEvolutionAnalysis
502 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: AssumptionAnalysis
503 ; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Loop pass manager run
504 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: RepeatedPass
505 ; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Loop pass manager run
506 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
507 ; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Loop pass manager run
508 ; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Loop pass manager run
509 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
510 ; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Loop pass manager run
511 ; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Loop pass manager run
512 ; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
513 ; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Loop pass manager run
514 ; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Loop pass manager run
515 ; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Function pass manager run
516 ; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Module pass manager run
518 define void @foo(i1 %x) {
520 br i1 %x, label %loop, label %exit