• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
6; paces.
7
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
14
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 analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}},{{.*}}Module>
23; CHECK-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(FunctionAnalysisManager|AnalysisManager<.*Function.*>).*}},{{.*}}Module>
24; CHECK-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis
25; CHECK-CGSCC-PASS-NEXT: Running analysis: TargetLibraryAnalysis
26; CHECK-CGSCC-PASS-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
27; CHECK-CGSCC-PASS-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}>
28; CHECK-CGSCC-PASS-NEXT: Starting CGSCC pass manager run
29; CHECK-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
30; CHECK-CGSCC-PASS-NEXT: Finished CGSCC pass manager run
31; CHECK-CGSCC-PASS-NEXT: Finished llvm::Module pass manager run
32
33; RUN: opt -disable-output -disable-verify -debug-pass-manager \
34; RUN:     -passes=no-op-function %s 2>&1 \
35; RUN:     | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS
36; RUN: opt -disable-output -disable-verify -debug-pass-manager \
37; RUN:     -passes='function(no-op-function)' %s 2>&1 \
38; RUN:     | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS
39; CHECK-FUNCTION-PASS: Starting llvm::Module pass manager run
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
45
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, i8* %p1, i8* %p2)
53; CHECK-MODULE-PRINT: Running pass: VerifierPass
54; CHECK-MODULE-PRINT: Finished llvm::Module pass manager run
55
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, i8* %p1, i8* %p2)
62; CHECK-MODULE-VERIFY: Running pass: VerifierPass
63; CHECK-MODULE-VERIFY: Finished llvm::Module pass manager run
64
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 analysis: InnerAnalysisManagerProxy<{{.*}}>
70; CHECK-FUNCTION-PRINT: Starting llvm::Function pass manager run
71; CHECK-FUNCTION-PRINT: Running pass: PrintFunctionPass
72; CHECK-FUNCTION-PRINT-NOT: ModuleID
73; CHECK-FUNCTION-PRINT: define void @foo(i1 %x, i8* %p1, i8* %p2)
74; CHECK-FUNCTION-PRINT: Finished llvm::Function pass manager run
75; CHECK-FUNCTION-PRINT: Running pass: VerifierPass
76; CHECK-FUNCTION-PRINT: Finished llvm::Module pass manager run
77
78; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='function(print,verify)' %s 2>&1 \
79; RUN:     | FileCheck %s --check-prefix=CHECK-FUNCTION-VERIFY
80; CHECK-FUNCTION-VERIFY: Starting llvm::Module pass manager run
81; CHECK-FUNCTION-VERIFY: Starting llvm::Function pass manager run
82; CHECK-FUNCTION-VERIFY: Running pass: PrintFunctionPass
83; CHECK-FUNCTION-VERIFY-NOT: ModuleID
84; CHECK-FUNCTION-VERIFY: define void @foo(i1 %x, i8* %p1, i8* %p2)
85; CHECK-FUNCTION-VERIFY: Running pass: VerifierPass
86; CHECK-FUNCTION-VERIFY: Finished llvm::Function pass manager run
87; CHECK-FUNCTION-VERIFY: Finished llvm::Module pass manager run
88
89; RUN: opt -S -o - -passes='no-op-module,no-op-module' %s \
90; RUN:     | FileCheck %s --check-prefix=CHECK-NOOP
91; CHECK-NOOP: define void @foo(i1 %x, i8* %p1, i8* %p2) {
92; CHECK-NOOP: entry:
93; CHECK-NOOP:   store i8 42, i8* %p1
94; CHECK-NOOP:   br i1 %x, label %loop, label %exit
95; CHECK-NOOP: loop:
96; CHECK-NOOP:   %tmp1 = load i8, i8* %p2
97; CHECK-NOOP:   br label %loop
98; CHECK-NOOP: exit:
99; CHECK-NOOP:   ret void
100; CHECK-NOOP: }
101
102; Round trip through bitcode.
103; RUN: opt -f -o - -passes='no-op-module,no-op-module' %s \
104; RUN:     | llvm-dis \
105; RUN:     | FileCheck %s --check-prefix=CHECK-NOOP
106
107; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='no-op-module,function(no-op-function)' %s 2>&1 \
108; RUN:     | FileCheck %s --check-prefix=CHECK-NO-VERIFY
109; CHECK-NO-VERIFY: Starting llvm::Module pass manager run
110; CHECK-NO-VERIFY-NOT: VerifierPass
111; CHECK-NO-VERIFY: Running pass: NoOpModulePass
112; CHECK-NO-VERIFY-NOT: VerifierPass
113; CHECK-NO-VERIFY: Starting llvm::Function pass manager run
114; CHECK-NO-VERIFY: Running pass: NoOpFunctionPass
115; CHECK-NO-VERIFY-NOT: VerifierPass
116; CHECK-NO-VERIFY: Finished llvm::Function pass manager run
117; CHECK-NO-VERIFY-NOT: VerifierPass
118; CHECK-NO-VERIFY: Finished llvm::Module pass manager run
119
120; RUN: opt -disable-output -debug-pass-manager \
121; RUN:     -passes='require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>))' %s 2>&1 \
122; RUN:     | FileCheck %s --check-prefix=CHECK-ANALYSES
123; CHECK-ANALYSES: Starting llvm::Module pass manager run
124; CHECK-ANALYSES: Running pass: RequireAnalysisPass
125; CHECK-ANALYSES: Running analysis: NoOpModuleAnalysis
126; CHECK-ANALYSES: Starting CGSCC pass manager run
127; CHECK-ANALYSES: Running pass: RequireAnalysisPass
128; CHECK-ANALYSES: Running analysis: NoOpCGSCCAnalysis
129; CHECK-ANALYSES: Starting llvm::Function pass manager run
130; CHECK-ANALYSES: Running pass: RequireAnalysisPass
131; CHECK-ANALYSES: Running analysis: NoOpFunctionAnalysis
132
133; Make sure no-op passes that preserve all analyses don't even try to do any
134; analysis invalidation.
135; RUN: opt -disable-output -debug-pass-manager \
136; RUN:     -passes='require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>))' %s 2>&1 \
137; RUN:     | FileCheck %s --check-prefix=CHECK-NO-OP-INVALIDATION
138; CHECK-NO-OP-INVALIDATION: Starting llvm::Module pass manager run
139
140; RUN: opt -disable-output -debug-pass-manager \
141; RUN:     -passes='require<no-op-module>,require<no-op-module>,require<no-op-module>' %s 2>&1 \
142; RUN:     | FileCheck %s --check-prefix=CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS
143; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
144; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
145; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
146; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS-NOT: Running analysis: NoOpModuleAnalysis
147
148; RUN: opt -disable-output -debug-pass-manager \
149; RUN:     -passes='require<no-op-module>,invalidate<no-op-module>,require<no-op-module>' %s 2>&1 \
150; RUN:     | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS
151; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
152; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
153; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
154; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Invalidating analysis: NoOpModuleAnalysis
155; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
156
157; RUN: opt -disable-output -debug-pass-manager \
158; RUN:     -passes='cgscc(require<no-op-cgscc>,require<no-op-cgscc>,require<no-op-cgscc>)' %s 2>&1 \
159; RUN:     | FileCheck %s --check-prefix=CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS
160; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
161; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
162; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
163; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS-NOT: Running analysis: NoOpCGSCCAnalysis
164
165; RUN: opt -disable-output -debug-pass-manager \
166; RUN:     -passes='cgscc(require<no-op-cgscc>,invalidate<no-op-cgscc>,require<no-op-cgscc>)' %s 2>&1 \
167; RUN:     | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS
168; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
169; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
170; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
171; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Invalidating analysis: NoOpCGSCCAnalysis
172; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
173
174; RUN: opt -disable-output -debug-pass-manager \
175; RUN:     -passes='function(require<no-op-function>,require<no-op-function>,require<no-op-function>)' %s 2>&1 \
176; RUN:     | FileCheck %s --check-prefix=CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS
177; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
178; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
179; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
180; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS-NOT: Running analysis: NoOpFunctionAnalysis
181
182; RUN: opt -disable-output -debug-pass-manager \
183; RUN:     -passes='function(require<no-op-function>,invalidate<no-op-function>,require<no-op-function>)' %s 2>&1 \
184; RUN:     | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS
185; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
186; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
187; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
188; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Invalidating analysis: NoOpFunctionAnalysis
189; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
190
191; RUN: opt -disable-output -disable-verify -debug-pass-manager \
192; 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 \
193; RUN:     | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL
194; CHECK-INVALIDATE-ALL: Starting llvm::Module pass manager run
195; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
196; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis
197; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
198; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis
199; CHECK-INVALIDATE-ALL: Starting llvm::Function pass manager run
200; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
201; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis
202; CHECK-INVALIDATE-ALL: Running pass: InvalidateAllAnalysesPass
203; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpFunctionAnalysis
204; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
205; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis
206; CHECK-INVALIDATE-ALL: Finished llvm::Function pass manager run
207; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpModuleAnalysis
208; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
209; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis
210; CHECK-INVALIDATE-ALL-NOT: Invalidating analysis: NoOpModuleAnalysis
211; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
212; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis
213; CHECK-INVALIDATE-ALL: Finished llvm::Module pass manager run
214
215; RUN: opt -disable-output -disable-verify -debug-pass-manager \
216; 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 \
217; RUN:     | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL-CG
218; CHECK-INVALIDATE-ALL-CG: Starting llvm::Module pass manager run
219; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
220; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis
221; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
222; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis
223; CHECK-INVALIDATE-ALL-CG: Starting CGSCC pass manager run
224; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
225; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis
226; CHECK-INVALIDATE-ALL-CG: Starting llvm::Function pass manager run
227; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
228; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis
229; CHECK-INVALIDATE-ALL-CG: Running pass: InvalidateAllAnalysesPass
230; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpFunctionAnalysis
231; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
232; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis
233; CHECK-INVALIDATE-ALL-CG: Finished llvm::Function pass manager run
234; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpFunctionAnalysis
235; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpCGSCCAnalysis
236; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
237; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis
238; CHECK-INVALIDATE-ALL-CG: Finished CGSCC pass manager run
239; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpCGSCCAnalysis
240; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpModuleAnalysis
241; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
242; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis
243; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpModuleAnalysis
244; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
245; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis
246; CHECK-INVALIDATE-ALL-CG: Finished llvm::Module pass manager run
247
248; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
249; RUN:     -passes='require<targetlibinfo>,invalidate<all>,require<targetlibinfo>' \
250; RUN:     | FileCheck %s --check-prefix=CHECK-TLI
251; CHECK-TLI: Starting llvm::Module pass manager run
252; CHECK-TLI: Running pass: RequireAnalysisPass
253; CHECK-TLI: Running analysis: TargetLibraryAnalysis
254; CHECK-TLI: Running pass: InvalidateAllAnalysesPass
255; CHECK-TLI-NOT: Invalidating analysis: TargetLibraryAnalysis
256; CHECK-TLI: Running pass: RequireAnalysisPass
257; CHECK-TLI-NOT: Running analysis: TargetLibraryAnalysis
258; CHECK-TLI: Finished llvm::Module pass manager run
259
260; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
261; RUN:     -passes='require<targetir>,invalidate<all>,require<targetir>' \
262; RUN:     | FileCheck %s --check-prefix=CHECK-TIRA
263; CHECK-TIRA: Starting llvm::Module pass manager run
264; CHECK-TIRA: Running pass: RequireAnalysisPass
265; CHECK-TIRA: Running analysis: TargetIRAnalysis
266; CHECK-TIRA: Running pass: InvalidateAllAnalysesPass
267; CHECK-TIRA-NOT: Invalidating analysis: TargetIRAnalysis
268; CHECK-TIRA: Running pass: RequireAnalysisPass
269; CHECK-TIRA-NOT: Running analysis: TargetIRAnalysis
270; CHECK-TIRA: Finished llvm::Module pass manager run
271
272; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
273; RUN:     -passes='require<domtree>' \
274; RUN:     | FileCheck %s --check-prefix=CHECK-DT
275; CHECK-DT: Starting llvm::Module pass manager run
276; CHECK-DT: Running pass: RequireAnalysisPass
277; CHECK-DT: Running analysis: DominatorTreeAnalysis
278; CHECK-DT: Finished llvm::Module pass manager run
279
280; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
281; RUN:     -passes='require<basic-aa>' \
282; RUN:     | FileCheck %s --check-prefix=CHECK-BASIC-AA
283; CHECK-BASIC-AA: Starting llvm::Module pass manager run
284; CHECK-BASIC-AA: Running pass: RequireAnalysisPass
285; CHECK-BASIC-AA: Running analysis: BasicAA
286; CHECK-BASIC-AA: Finished llvm::Module pass manager run
287
288; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
289; RUN:     -passes='require<aa>' -aa-pipeline='basic-aa' \
290; RUN:     | FileCheck %s --check-prefix=CHECK-AA
291; CHECK-AA: Starting llvm::Module pass manager run
292; CHECK-AA: Running pass: RequireAnalysisPass
293; CHECK-AA: Running analysis: AAManager
294; CHECK-AA: Running analysis: BasicAA
295; CHECK-AA: Finished llvm::Module pass manager run
296
297; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
298; RUN:     -passes='require<aa>' -aa-pipeline='default' \
299; RUN:     | FileCheck %s --check-prefix=CHECK-AA-DEFAULT
300; CHECK-AA-DEFAULT: Starting llvm::Module pass manager run
301; CHECK-AA-DEFAULT: Running pass: RequireAnalysisPass
302; CHECK-AA-DEFAULT: Running analysis: AAManager
303; CHECK-AA-DEFAULT: Running analysis: BasicAA
304; CHECK-AA-DEFAULT: Running analysis: ScopedNoAliasAA
305; CHECK-AA-DEFAULT: Running analysis: TypeBasedAA
306; CHECK-AA-DEFAULT: Finished llvm::Module pass manager run
307
308; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
309; RUN:     -passes='require<aa>,invalidate<domtree>,aa-eval' -aa-pipeline='basic-aa' \
310; RUN:     | FileCheck %s --check-prefix=CHECK-AA-FUNCTION-INVALIDATE
311; CHECK-AA-FUNCTION-INVALIDATE: Starting llvm::Function pass manager run
312; CHECK-AA-FUNCTION-INVALIDATE: Running pass: RequireAnalysisPass
313; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: AAManager
314; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: BasicAA
315; CHECK-AA-FUNCTION-INVALIDATE: Running pass: InvalidateAnalysisPass
316; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: DominatorTreeAnalysis
317; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: BasicAA
318; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: AAManager
319; CHECK-AA-FUNCTION-INVALIDATE: Running pass: AAEvaluator
320; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: AAManager
321; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: BasicAA
322; CHECK-AA-FUNCTION-INVALIDATE: Finished llvm::Function pass manager run
323
324; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
325; RUN:     -passes='require<globals-aa>,function(require<aa>),invalidate<globals-aa>,require<globals-aa>,function(aa-eval)' -aa-pipeline='globals-aa' \
326; RUN:     | FileCheck %s --check-prefix=CHECK-AA-MODULE-INVALIDATE
327; CHECK-AA-MODULE-INVALIDATE: Starting llvm::Module pass manager run
328; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass
329; CHECK-AA-MODULE-INVALIDATE: Running analysis: GlobalsAA
330; CHECK-AA-MODULE-INVALIDATE: Starting llvm::Function pass manager run
331; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass
332; CHECK-AA-MODULE-INVALIDATE: Running analysis: AAManager
333; CHECK-AA-MODULE-INVALIDATE: Finished llvm::Function pass manager run
334; CHECK-AA-MODULE-INVALIDATE: Running pass: InvalidateAnalysisPass
335; CHECK-AA-MODULE-INVALIDATE: Invalidating analysis: GlobalsAA
336; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass
337; CHECK-AA-MODULE-INVALIDATE: Running analysis: GlobalsAA
338; CHECK-AA-MODULE-INVALIDATE: Starting llvm::Function pass manager run
339; CHECK-AA-MODULE-INVALIDATE: Running pass: AAEvaluator
340; CHECK-AA-MODULE-INVALIDATE: Finished llvm::Function pass manager run
341; CHECK-AA-MODULE-INVALIDATE: Finished llvm::Module pass manager run
342
343; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
344; RUN:     -passes='require<memdep>' \
345; RUN:     | FileCheck %s --check-prefix=CHECK-MEMDEP
346; CHECK-MEMDEP: Starting llvm::Module pass manager run
347; CHECK-MEMDEP: Running pass: RequireAnalysisPass
348; CHECK-MEMDEP: Running analysis: MemoryDependenceAnalysis
349; CHECK-MEMDEP: Finished llvm::Module pass manager run
350
351; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
352; RUN:     -passes='require<callgraph>' \
353; RUN:     | FileCheck %s --check-prefix=CHECK-CALLGRAPH
354; CHECK-CALLGRAPH: Starting llvm::Module pass manager run
355; CHECK-CALLGRAPH: Running pass: RequireAnalysisPass
356; CHECK-CALLGRAPH: Running analysis: CallGraphAnalysis
357; CHECK-CALLGRAPH: Finished llvm::Module pass manager run
358
359; RUN: opt -disable-output -disable-verify -debug-pass-manager \
360; RUN:     -passes='default<O0>' %s 2>&1 \
361; RUN:     | FileCheck %s --check-prefix=CHECK-O0 --check-prefix=%llvmcheckext
362; CHECK-O0: Starting llvm::Module pass manager run
363; CHECK-O0-NEXT: Running pass: AlwaysInlinerPass
364; CHECK-O0-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
365; CHECK-O0-NEXT: Running analysis: ProfileSummaryAnalysis
366; CHECK-EXT-NEXT: Starting llvm::Function pass manager run.
367; CHECK-EXT-NEXT: Running pass: {{.*}}Bye
368; CHECK-EXT-NEXT: Finished llvm::Function pass manager run.
369; CHECK-O0-NEXT: Finished llvm::Module pass manager run
370
371; RUN: opt -disable-output -disable-verify -debug-pass-manager \
372; RUN:     -passes='repeat<3>(no-op-module)' %s 2>&1 \
373; RUN:     | FileCheck %s --check-prefix=CHECK-REPEAT-MODULE-PASS
374; CHECK-REPEAT-MODULE-PASS: Starting llvm::Module pass manager run
375; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: RepeatedPass
376; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run
377; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
378; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run
379; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run
380; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
381; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run
382; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run
383; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
384; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run
385; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run
386
387; RUN: opt -disable-output -disable-verify -debug-pass-manager \
388; RUN:     -passes='cgscc(repeat<3>(no-op-cgscc))' %s 2>&1 \
389; RUN:     | FileCheck %s --check-prefix=CHECK-REPEAT-CGSCC-PASS
390; CHECK-REPEAT-CGSCC-PASS: Starting llvm::Module pass manager run
391; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}},{{.*}}Module>
392; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(FunctionAnalysisManager|AnalysisManager<.*Function.*>).*}},{{.*}}Module>
393; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis
394; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: TargetLibraryAnalysis
395; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
396; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}>
397; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run
398; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: RepeatedPass
399; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run
400; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
401; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run
402; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run
403; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
404; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run
405; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run
406; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
407; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run
408; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run
409; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished llvm::Module pass manager run
410
411; RUN: opt -disable-output -disable-verify -debug-pass-manager \
412; RUN:     -passes='function(repeat<3>(no-op-function))' %s 2>&1 \
413; RUN:     | FileCheck %s --check-prefix=CHECK-REPEAT-FUNCTION-PASS
414; CHECK-REPEAT-FUNCTION-PASS: Starting llvm::Module pass manager run
415; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
416; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run
417; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: RepeatedPass
418; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run
419; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
420; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run
421; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run
422; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
423; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run
424; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run
425; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
426; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run
427; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run
428; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Module pass manager run
429
430; RUN: opt -disable-output -disable-verify -debug-pass-manager \
431; RUN:     -passes='loop(repeat<3>(no-op-loop))' %s 2>&1 \
432; RUN:     | FileCheck %s --check-prefix=CHECK-REPEAT-LOOP-PASS
433; CHECK-REPEAT-LOOP-PASS: Starting llvm::Module pass manager run
434; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
435; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Function pass manager run
436; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Function pass manager run
437; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: LoopSimplify
438; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: LoopAnalysis
439; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: DominatorTreeAnalysis
440; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: AssumptionAnalysis
441; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: LCSSAPass
442; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Function pass manager run
443; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: AAManager
444; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TargetLibraryAnalysis
445; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: ScalarEvolutionAnalysis
446; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TargetIRAnalysis
447; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
448; CHECK-REPEAT-LOOP-PASS-NEXT: Starting Loop pass manager run
449; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: RepeatedPass
450; CHECK-REPEAT-LOOP-PASS-NEXT: Starting Loop pass manager run
451; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
452; CHECK-REPEAT-LOOP-PASS-NEXT: Finished Loop pass manager run
453; CHECK-REPEAT-LOOP-PASS-NEXT: Starting Loop pass manager run
454; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
455; CHECK-REPEAT-LOOP-PASS-NEXT: Finished Loop pass manager run
456; CHECK-REPEAT-LOOP-PASS-NEXT: Starting Loop pass manager run
457; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
458; CHECK-REPEAT-LOOP-PASS-NEXT: Finished Loop pass manager run
459; CHECK-REPEAT-LOOP-PASS-NEXT: Finished Loop pass manager run
460; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Function pass manager run
461; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Module pass manager run
462
463define void @foo(i1 %x, i8* %p1, i8* %p2) {
464entry:
465  store i8 42, i8* %p1
466  br i1 %x, label %loop, label %exit
467
468loop:
469  %tmp1 = load i8, i8* %p2
470  br label %loop
471
472exit:
473  ret void
474}
475
476declare void @bar()
477