llvm.org GIT mirror llvm / 51fa09d
[PM] Wire up support for explicitly running the verifier pass. The required functionality has been there for some time, but I never managed to actually wire it into the command line registry of passes. Let's do that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225144 91177308-0d34-0410-b5e6-96231b3b80d8 Chandler Carruth 4 years ago
2 changed file(s) with 22 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1414 ; CHECK-MODULE-PRINT: Running module pass: VerifierPass
1515 ; CHECK-MODULE-PRINT: Finished module pass manager
1616
17 ; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='print,verify' %s 2>&1 \
18 ; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-VERIFY
19 ; CHECK-MODULE-VERIFY: Starting module pass manager
20 ; CHECK-MODULE-VERIFY: Running module pass: PrintModulePass
21 ; CHECK-MODULE-VERIFY: ModuleID
22 ; CHECK-MODULE-VERIFY: define void @foo()
23 ; CHECK-MODULE-VERIFY: Running module pass: VerifierPass
24 ; CHECK-MODULE-VERIFY: Finished module pass manager
25
1726 ; RUN: opt -disable-output -debug-pass-manager -passes='function(print)' %s 2>&1 \
1827 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PRINT
1928 ; CHECK-FUNCTION-PRINT: Starting module pass manager
2534 ; CHECK-FUNCTION-PRINT: Finished function pass manager
2635 ; CHECK-FUNCTION-PRINT: Running module pass: VerifierPass
2736 ; CHECK-FUNCTION-PRINT: Finished module pass manager
37
38 ; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='function(print,verify)' %s 2>&1 \
39 ; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-VERIFY
40 ; CHECK-FUNCTION-VERIFY: Starting module pass manager
41 ; CHECK-FUNCTION-VERIFY: Starting function pass manager
42 ; CHECK-FUNCTION-VERIFY: Running function pass: PrintFunctionPass
43 ; CHECK-FUNCTION-VERIFY-NOT: ModuleID
44 ; CHECK-FUNCTION-VERIFY: define void @foo()
45 ; CHECK-FUNCTION-VERIFY: Running function pass: VerifierPass
46 ; CHECK-FUNCTION-VERIFY: Finished function pass manager
47 ; CHECK-FUNCTION-VERIFY: Finished module pass manager
2848
2949 ; RUN: opt -S -o - -passes='no-op-module,no-op-module' %s \
3050 ; RUN: | FileCheck %s --check-prefix=CHECK-NOOP
2626 #endif
2727 MODULE_PASS("print", PrintModulePass(dbgs()))
2828 MODULE_PASS("print-cg", LazyCallGraphPrinterPass(dbgs()))
29 MODULE_PASS("verify", VerifierPass())
2930 #undef MODULE_PASS
3031
3132 #ifndef CGSCC_ANALYSIS
4748 #define FUNCTION_PASS(NAME, CREATE_PASS)
4849 #endif
4950 FUNCTION_PASS("print", PrintFunctionPass(dbgs()))
51 FUNCTION_PASS("verify", VerifierPass())
5052 #undef FUNCTION_PASS