MCSchedule.h: fix VS2012 build after r216919
[oota-llvm.git] / test / Other / new-pass-manager.ll
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 -debug-pass-manager -passes=print %s 2>&1 \
9 ; RUN:     | FileCheck %s --check-prefix=CHECK-MODULE-PRINT
10 ; CHECK-MODULE-PRINT: Starting module pass manager
11 ; CHECK-MODULE-PRINT: Running module pass: VerifierPass
12 ; CHECK-MODULE-PRINT: Running module pass: PrintModulePass
13 ; CHECK-MODULE-PRINT: ModuleID
14 ; CHECK-MODULE-PRINT: define void @foo()
15 ; CHECK-MODULE-PRINT: Running module pass: VerifierPass
16 ; CHECK-MODULE-PRINT: Finished module pass manager
17
18 ; RUN: opt -disable-output -debug-pass-manager -passes='function(print)' %s 2>&1 \
19 ; RUN:     | FileCheck %s --check-prefix=CHECK-FUNCTION-PRINT
20 ; CHECK-FUNCTION-PRINT: Starting module pass manager
21 ; CHECK-FUNCTION-PRINT: Running module pass: VerifierPass
22 ; CHECK-FUNCTION-PRINT: Starting function pass manager
23 ; CHECK-FUNCTION-PRINT: Running function pass: PrintFunctionPass
24 ; CHECK-FUNCTION-PRINT-NOT: ModuleID
25 ; CHECK-FUNCTION-PRINT: define void @foo()
26 ; CHECK-FUNCTION-PRINT: Finished function pass manager
27 ; CHECK-FUNCTION-PRINT: Running module pass: VerifierPass
28 ; CHECK-FUNCTION-PRINT: Finished module pass manager
29
30 ; RUN: opt -S -o - -passes='no-op-module,no-op-module' %s \
31 ; RUN:     | FileCheck %s --check-prefix=CHECK-NOOP
32 ; CHECK-NOOP: define void @foo() {
33 ; CHECK-NOOP:   ret void
34 ; CHECK-NOOP: }
35
36 ; Round trip through bitcode.
37 ; RUN: opt -f -o - -passes='no-op-module,no-op-module' %s \
38 ; RUN:     | llvm-dis \
39 ; RUN:     | FileCheck %s --check-prefix=CHECK-NOOP
40
41 ; RUN: opt -disable-output -debug-pass-manager -verify-each -passes='no-op-module,function(no-op-function)' %s 2>&1 \
42 ; RUN:     | FileCheck %s --check-prefix=CHECK-VERIFY-EACH
43 ; CHECK-VERIFY-EACH: Starting module pass manager
44 ; CHECK-VERIFY-EACH: Running module pass: VerifierPass
45 ; CHECK-VERIFY-EACH: Running module pass: NoOpModulePass
46 ; CHECK-VERIFY-EACH: Running module pass: VerifierPass
47 ; CHECK-VERIFY-EACH: Starting function pass manager
48 ; CHECK-VERIFY-EACH: Running function pass: NoOpFunctionPass
49 ; CHECK-VERIFY-EACH: Running function pass: VerifierPass
50 ; CHECK-VERIFY-EACH: Finished function pass manager
51 ; CHECK-VERIFY-EACH: Running module pass: VerifierPass
52 ; CHECK-VERIFY-EACH: Finished module pass manager
53
54 ; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='no-op-module,function(no-op-function)' %s 2>&1 \
55 ; RUN:     | FileCheck %s --check-prefix=CHECK-NO-VERIFY
56 ; CHECK-NO-VERIFY: Starting module pass manager
57 ; CHECK-NO-VERIFY-NOT: VerifierPass
58 ; CHECK-NO-VERIFY: Running module pass: NoOpModulePass
59 ; CHECK-NO-VERIFY-NOT: VerifierPass
60 ; CHECK-NO-VERIFY: Starting function pass manager
61 ; CHECK-NO-VERIFY: Running function pass: NoOpFunctionPass
62 ; CHECK-NO-VERIFY-NOT: VerifierPass
63 ; CHECK-NO-VERIFY: Finished function pass manager
64 ; CHECK-NO-VERIFY-NOT: VerifierPass
65 ; CHECK-NO-VERIFY: Finished module pass manager
66
67 define void @foo() {
68   ret void
69 }