[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. llvm-svn: 225144
This commit is contained in:
		
							parent
							
								
									75c11b88af
								
							
						
					
					
						commit
						9c31db4f94
					
				| 
						 | 
				
			
			@ -15,6 +15,15 @@
 | 
			
		|||
; CHECK-MODULE-PRINT: Running module pass: VerifierPass
 | 
			
		||||
; CHECK-MODULE-PRINT: Finished module pass manager
 | 
			
		||||
 | 
			
		||||
; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='print,verify' %s 2>&1 \
 | 
			
		||||
; RUN:     | FileCheck %s --check-prefix=CHECK-MODULE-VERIFY
 | 
			
		||||
; CHECK-MODULE-VERIFY: Starting module pass manager
 | 
			
		||||
; CHECK-MODULE-VERIFY: Running module pass: PrintModulePass
 | 
			
		||||
; CHECK-MODULE-VERIFY: ModuleID
 | 
			
		||||
; CHECK-MODULE-VERIFY: define void @foo()
 | 
			
		||||
; CHECK-MODULE-VERIFY: Running module pass: VerifierPass
 | 
			
		||||
; CHECK-MODULE-VERIFY: Finished module pass manager
 | 
			
		||||
 | 
			
		||||
; RUN: opt -disable-output -debug-pass-manager -passes='function(print)' %s 2>&1 \
 | 
			
		||||
; RUN:     | FileCheck %s --check-prefix=CHECK-FUNCTION-PRINT
 | 
			
		||||
; CHECK-FUNCTION-PRINT: Starting module pass manager
 | 
			
		||||
| 
						 | 
				
			
			@ -27,6 +36,17 @@
 | 
			
		|||
; CHECK-FUNCTION-PRINT: Running module pass: VerifierPass
 | 
			
		||||
; CHECK-FUNCTION-PRINT: Finished module pass manager
 | 
			
		||||
 | 
			
		||||
; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='function(print,verify)' %s 2>&1 \
 | 
			
		||||
; RUN:     | FileCheck %s --check-prefix=CHECK-FUNCTION-VERIFY
 | 
			
		||||
; CHECK-FUNCTION-VERIFY: Starting module pass manager
 | 
			
		||||
; CHECK-FUNCTION-VERIFY: Starting function pass manager
 | 
			
		||||
; CHECK-FUNCTION-VERIFY: Running function pass: PrintFunctionPass
 | 
			
		||||
; CHECK-FUNCTION-VERIFY-NOT: ModuleID
 | 
			
		||||
; CHECK-FUNCTION-VERIFY: define void @foo()
 | 
			
		||||
; CHECK-FUNCTION-VERIFY: Running function pass: VerifierPass
 | 
			
		||||
; CHECK-FUNCTION-VERIFY: Finished function pass manager
 | 
			
		||||
; CHECK-FUNCTION-VERIFY: Finished module pass manager
 | 
			
		||||
 | 
			
		||||
; RUN: opt -S -o - -passes='no-op-module,no-op-module' %s \
 | 
			
		||||
; RUN:     | FileCheck %s --check-prefix=CHECK-NOOP
 | 
			
		||||
; CHECK-NOOP: define void @foo() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,6 +27,7 @@ MODULE_ANALYSIS("lcg", LazyCallGraphAnalysis())
 | 
			
		|||
#endif
 | 
			
		||||
MODULE_PASS("print", PrintModulePass(dbgs()))
 | 
			
		||||
MODULE_PASS("print-cg", LazyCallGraphPrinterPass(dbgs()))
 | 
			
		||||
MODULE_PASS("verify", VerifierPass())
 | 
			
		||||
#undef MODULE_PASS
 | 
			
		||||
 | 
			
		||||
#ifndef CGSCC_ANALYSIS
 | 
			
		||||
| 
						 | 
				
			
			@ -48,4 +49,5 @@ MODULE_PASS("print-cg", LazyCallGraphPrinterPass(dbgs()))
 | 
			
		|||
#define FUNCTION_PASS(NAME, CREATE_PASS)
 | 
			
		||||
#endif
 | 
			
		||||
FUNCTION_PASS("print", PrintFunctionPass(dbgs()))
 | 
			
		||||
FUNCTION_PASS("verify", VerifierPass())
 | 
			
		||||
#undef FUNCTION_PASS
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue