[PM/AA] Don't bother forward declaring Function and Value, just include
[oota-llvm.git] / test / Other / pass-pipeline-parsing.ll
1 ; RUN: opt -disable-output -debug-pass-manager \
2 ; RUN:     -passes=no-op-module,no-op-module %s 2>&1 \
3 ; RUN:     | FileCheck %s --check-prefix=CHECK-TWO-NOOP-MP
4 ; CHECK-TWO-NOOP-MP: Starting pass manager
5 ; CHECK-TWO-NOOP-MP: Running pass: NoOpModulePass
6 ; CHECK-TWO-NOOP-MP: Running pass: NoOpModulePass
7 ; CHECK-TWO-NOOP-MP: Finished pass manager
8
9 ; RUN: opt -disable-output -debug-pass-manager \
10 ; RUN:     -passes='module(no-op-module,no-op-module)' %s 2>&1 \
11 ; RUN:     | FileCheck %s --check-prefix=CHECK-NESTED-TWO-NOOP-MP
12 ; CHECK-NESTED-TWO-NOOP-MP: Starting pass manager
13 ; CHECK-NESTED-TWO-NOOP-MP: Starting pass manager
14 ; CHECK-NESTED-TWO-NOOP-MP: Running pass: NoOpModulePass
15 ; CHECK-NESTED-TWO-NOOP-MP: Running pass: NoOpModulePass
16 ; CHECK-NESTED-TWO-NOOP-MP: Finished pass manager
17 ; CHECK-NESTED-TWO-NOOP-MP: Finished pass manager
18
19 ; RUN: opt -disable-output -debug-pass-manager \
20 ; RUN:     -passes=no-op-function,no-op-function %s 2>&1 \
21 ; RUN:     | FileCheck %s --check-prefix=CHECK-TWO-NOOP-FP
22 ; CHECK-TWO-NOOP-FP: Starting pass manager
23 ; CHECK-TWO-NOOP-FP: Running pass: ModuleToFunctionPassAdaptor
24 ; CHECK-TWO-NOOP-FP: Starting pass manager
25 ; CHECK-TWO-NOOP-FP: Running pass: NoOpFunctionPass
26 ; CHECK-TWO-NOOP-FP: Running pass: NoOpFunctionPass
27 ; CHECK-TWO-NOOP-FP: Finished pass manager
28 ; CHECK-TWO-NOOP-FP: Finished pass manager
29
30 ; RUN: opt -disable-output -debug-pass-manager \
31 ; RUN:     -passes='function(no-op-function,no-op-function)' %s 2>&1 \
32 ; RUN:     | FileCheck %s --check-prefix=CHECK-NESTED-TWO-NOOP-FP
33 ; CHECK-NESTED-TWO-NOOP-FP: Starting pass manager
34 ; CHECK-NESTED-TWO-NOOP-FP: Running pass: ModuleToFunctionPassAdaptor
35 ; CHECK-NESTED-TWO-NOOP-FP: Starting pass manager
36 ; CHECK-NESTED-TWO-NOOP-FP: Running pass: NoOpFunctionPass
37 ; CHECK-NESTED-TWO-NOOP-FP: Running pass: NoOpFunctionPass
38 ; CHECK-NESTED-TWO-NOOP-FP: Finished pass manager
39 ; CHECK-NESTED-TWO-NOOP-FP: Finished pass manager
40
41 ; RUN: opt -disable-output -debug-pass-manager \
42 ; RUN:     -passes='no-op-module,function(no-op-function,no-op-function),no-op-module' %s 2>&1 \
43 ; RUN:     | FileCheck %s --check-prefix=CHECK-MIXED-FP-AND-MP
44 ; CHECK-MIXED-FP-AND-MP: Starting pass manager
45 ; CHECK-MIXED-FP-AND-MP: Running pass: NoOpModulePass
46 ; CHECK-MIXED-FP-AND-MP: Running pass: ModuleToFunctionPassAdaptor
47 ; CHECK-MIXED-FP-AND-MP: Starting pass manager
48 ; CHECK-MIXED-FP-AND-MP: Running pass: NoOpFunctionPass
49 ; CHECK-MIXED-FP-AND-MP: Running pass: NoOpFunctionPass
50 ; CHECK-MIXED-FP-AND-MP: Finished pass manager
51 ; CHECK-MIXED-FP-AND-MP: Running pass: NoOpModulePass
52 ; CHECK-MIXED-FP-AND-MP: Finished pass manager
53
54 ; RUN: not opt -disable-output -debug-pass-manager \
55 ; RUN:     -passes='no-op-module)' %s 2>&1 \
56 ; RUN:     | FileCheck %s --check-prefix=CHECK-UNBALANCED1
57 ; CHECK-UNBALANCED1: unable to parse pass pipeline description
58
59 ; RUN: not opt -disable-output -debug-pass-manager \
60 ; RUN:     -passes='module(no-op-module))' %s 2>&1 \
61 ; RUN:     | FileCheck %s --check-prefix=CHECK-UNBALANCED2
62 ; CHECK-UNBALANCED2: unable to parse pass pipeline description
63
64 ; RUN: not opt -disable-output -debug-pass-manager \
65 ; RUN:     -passes='module(no-op-module' %s 2>&1 \
66 ; RUN:     | FileCheck %s --check-prefix=CHECK-UNBALANCED3
67 ; CHECK-UNBALANCED3: unable to parse pass pipeline description
68
69 ; RUN: not opt -disable-output -debug-pass-manager \
70 ; RUN:     -passes='no-op-function)' %s 2>&1 \
71 ; RUN:     | FileCheck %s --check-prefix=CHECK-UNBALANCED4
72 ; CHECK-UNBALANCED4: unable to parse pass pipeline description
73
74 ; RUN: not opt -disable-output -debug-pass-manager \
75 ; RUN:     -passes='function(no-op-function))' %s 2>&1 \
76 ; RUN:     | FileCheck %s --check-prefix=CHECK-UNBALANCED5
77 ; CHECK-UNBALANCED5: unable to parse pass pipeline description
78
79 ; RUN: not opt -disable-output -debug-pass-manager \
80 ; RUN:     -passes='function(function(no-op-function)))' %s 2>&1 \
81 ; RUN:     | FileCheck %s --check-prefix=CHECK-UNBALANCED6
82 ; CHECK-UNBALANCED6: unable to parse pass pipeline description
83
84 ; RUN: not opt -disable-output -debug-pass-manager \
85 ; RUN:     -passes='function(no-op-function' %s 2>&1 \
86 ; RUN:     | FileCheck %s --check-prefix=CHECK-UNBALANCED7
87 ; CHECK-UNBALANCED7: unable to parse pass pipeline description
88
89 ; RUN: not opt -disable-output -debug-pass-manager \
90 ; RUN:     -passes='function(function(no-op-function)' %s 2>&1 \
91 ; RUN:     | FileCheck %s --check-prefix=CHECK-UNBALANCED8
92 ; CHECK-UNBALANCED8: unable to parse pass pipeline description
93
94 ; RUN: not opt -disable-output -debug-pass-manager \
95 ; RUN:     -passes='no-op-module,)' %s 2>&1 \
96 ; RUN:     | FileCheck %s --check-prefix=CHECK-UNBALANCED9
97 ; CHECK-UNBALANCED9: unable to parse pass pipeline description
98
99 ; RUN: not opt -disable-output -debug-pass-manager \
100 ; RUN:     -passes='no-op-function,)' %s 2>&1 \
101 ; RUN:     | FileCheck %s --check-prefix=CHECK-UNBALANCED10
102 ; CHECK-UNBALANCED10: unable to parse pass pipeline description
103
104 ; RUN: opt -disable-output -debug-pass-manager \
105 ; RUN:     -passes=no-op-cgscc,no-op-cgscc %s 2>&1 \
106 ; RUN:     | FileCheck %s --check-prefix=CHECK-TWO-NOOP-CG
107 ; CHECK-TWO-NOOP-CG: Starting pass manager
108 ; CHECK-TWO-NOOP-CG: Running pass: ModuleToPostOrderCGSCCPassAdaptor
109 ; CHECK-TWO-NOOP-CG: Starting pass manager
110 ; CHECK-TWO-NOOP-CG: Running pass: NoOpCGSCCPass
111 ; CHECK-TWO-NOOP-CG: Running pass: NoOpCGSCCPass
112 ; CHECK-TWO-NOOP-CG: Finished pass manager
113 ; CHECK-TWO-NOOP-CG: Finished pass manager
114
115 ; RUN: opt -disable-output -debug-pass-manager \
116 ; 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 \
117 ; RUN:     | FileCheck %s --check-prefix=CHECK-NESTED-MP-CG-FP
118 ; CHECK-NESTED-MP-CG-FP: Starting pass manager
119 ; CHECK-NESTED-MP-CG-FP: Starting pass manager
120 ; CHECK-NESTED-MP-CG-FP: Running pass: ModuleToFunctionPassAdaptor
121 ; CHECK-NESTED-MP-CG-FP: Starting pass manager
122 ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpFunctionPass
123 ; CHECK-NESTED-MP-CG-FP: Finished pass manager
124 ; CHECK-NESTED-MP-CG-FP: Running pass: ModuleToPostOrderCGSCCPassAdaptor
125 ; CHECK-NESTED-MP-CG-FP: Starting pass manager
126 ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpCGSCCPass
127 ; CHECK-NESTED-MP-CG-FP: Running pass: CGSCCToFunctionPassAdaptor
128 ; CHECK-NESTED-MP-CG-FP: Starting pass manager
129 ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpFunctionPass
130 ; CHECK-NESTED-MP-CG-FP: Finished pass manager
131 ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpCGSCCPass
132 ; CHECK-NESTED-MP-CG-FP: Finished pass manager
133 ; CHECK-NESTED-MP-CG-FP: Running pass: ModuleToFunctionPassAdaptor
134 ; CHECK-NESTED-MP-CG-FP: Starting pass manager
135 ; CHECK-NESTED-MP-CG-FP: Running pass: NoOpFunctionPass
136 ; CHECK-NESTED-MP-CG-FP: Finished pass manager
137 ; CHECK-NESTED-MP-CG-FP: Finished pass manager
138 ; CHECK-NESTED-MP-CG-FP: Finished pass manager
139
140 define void @f() {
141  ret void
142 }