2014-01-12 20:15:39 +08:00
|
|
|
; This test is essentially doing very basic things with the opt tool and the
|
|
|
|
; new pass manager pipeline. It will be used to flesh out the feature
|
|
|
|
; completeness of the opt tool when the new pass manager is engaged. The tests
|
|
|
|
; may not be useful once it becomes the default or may get spread out into other
|
|
|
|
; files, but for now this is just going to step the new process through its
|
|
|
|
; paces.
|
|
|
|
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
2015-01-06 16:37:58 +08:00
|
|
|
; RUN: -passes=no-op-module %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PASS
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-MODULE-PASS: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-MODULE-PASS-NEXT: Running pass: NoOpModulePass
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-MODULE-PASS-NEXT: Finished llvm::Module pass manager run
|
2015-01-06 16:37:58 +08:00
|
|
|
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
2015-01-06 16:37:58 +08:00
|
|
|
; RUN: -passes=no-op-cgscc %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-CGSCC-PASS
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
2015-01-06 16:37:58 +08:00
|
|
|
; RUN: -passes='cgscc(no-op-cgscc)' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-CGSCC-PASS
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-CGSCC-PASS: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-CGSCC-PASS-NEXT: Running pass: ModuleToPostOrderCGSCCPassAdaptor
|
2016-02-27 19:07:16 +08:00
|
|
|
; CHECK-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
|
2016-02-26 19:44:45 +08:00
|
|
|
; CHECK-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis
|
2016-06-28 07:26:08 +08:00
|
|
|
; CHECK-CGSCC-PASS-NEXT: Running an SCC pass across the RefSCC: [(foo)]
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-CGSCC-PASS-NEXT: Starting llvm::LazyCallGraph::SCC pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-CGSCC-PASS-NEXT: Finished llvm::LazyCallGraph::SCC pass manager run
|
|
|
|
; CHECK-CGSCC-PASS-NEXT: Finished llvm::Module pass manager run
|
2015-01-06 16:37:58 +08:00
|
|
|
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
2015-01-06 16:37:58 +08:00
|
|
|
; RUN: -passes=no-op-function %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
2015-01-06 16:37:58 +08:00
|
|
|
; RUN: -passes='function(no-op-function)' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-FUNCTION-PASS: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-FUNCTION-PASS-NEXT: Running pass: ModuleToFunctionPassAdaptor
|
2016-02-27 19:07:16 +08:00
|
|
|
; CHECK-FUNCTION-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run
|
|
|
|
; CHECK-FUNCTION-PASS-NEXT: Finished llvm::Module pass manager run
|
2015-01-06 16:37:58 +08:00
|
|
|
|
2014-01-12 20:15:39 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager -passes=print %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PRINT
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-MODULE-PRINT: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-MODULE-PRINT: Running pass: VerifierPass
|
|
|
|
; CHECK-MODULE-PRINT: Running pass: PrintModulePass
|
2014-01-12 20:15:39 +08:00
|
|
|
; CHECK-MODULE-PRINT: ModuleID
|
2016-08-03 15:44:48 +08:00
|
|
|
; CHECK-MODULE-PRINT: define void @foo(i1 %x)
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-MODULE-PRINT: Running pass: VerifierPass
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-MODULE-PRINT: Finished llvm::Module pass manager run
|
2014-01-12 20:15:39 +08:00
|
|
|
|
2015-01-05 08:08:53 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='print,verify' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-VERIFY
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-MODULE-VERIFY: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-MODULE-VERIFY: Running pass: PrintModulePass
|
2015-01-05 08:08:53 +08:00
|
|
|
; CHECK-MODULE-VERIFY: ModuleID
|
2016-08-03 15:44:48 +08:00
|
|
|
; CHECK-MODULE-VERIFY: define void @foo(i1 %x)
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-MODULE-VERIFY: Running pass: VerifierPass
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-MODULE-VERIFY: Finished llvm::Module pass manager run
|
2015-01-05 08:08:53 +08:00
|
|
|
|
2014-01-12 20:15:39 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager -passes='function(print)' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PRINT
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-FUNCTION-PRINT: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-FUNCTION-PRINT: Running pass: VerifierPass
|
|
|
|
; CHECK-FUNCTION-PRINT: Running pass: ModuleToFunctionPassAdaptor
|
2016-02-27 19:07:16 +08:00
|
|
|
; CHECK-FUNCTION-PRINT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-FUNCTION-PRINT: Starting llvm::Function pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-FUNCTION-PRINT: Running pass: PrintFunctionPass
|
2014-01-12 20:15:39 +08:00
|
|
|
; CHECK-FUNCTION-PRINT-NOT: ModuleID
|
2016-08-03 15:44:48 +08:00
|
|
|
; CHECK-FUNCTION-PRINT: define void @foo(i1 %x)
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-FUNCTION-PRINT: Finished llvm::Function pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-FUNCTION-PRINT: Running pass: VerifierPass
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-FUNCTION-PRINT: Finished llvm::Module pass manager run
|
2014-01-12 20:15:39 +08:00
|
|
|
|
2015-01-05 08:08:53 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='function(print,verify)' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-VERIFY
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-FUNCTION-VERIFY: Starting llvm::Module pass manager run
|
|
|
|
; CHECK-FUNCTION-VERIFY: Starting llvm::Function pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-FUNCTION-VERIFY: Running pass: PrintFunctionPass
|
2015-01-05 08:08:53 +08:00
|
|
|
; CHECK-FUNCTION-VERIFY-NOT: ModuleID
|
2016-08-03 15:44:48 +08:00
|
|
|
; CHECK-FUNCTION-VERIFY: define void @foo(i1 %x)
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-FUNCTION-VERIFY: Running pass: VerifierPass
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-FUNCTION-VERIFY: Finished llvm::Function pass manager run
|
|
|
|
; CHECK-FUNCTION-VERIFY: Finished llvm::Module pass manager run
|
2015-01-05 08:08:53 +08:00
|
|
|
|
2014-01-13 13:16:45 +08:00
|
|
|
; RUN: opt -S -o - -passes='no-op-module,no-op-module' %s \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-NOOP
|
2016-08-03 15:44:48 +08:00
|
|
|
; CHECK-NOOP: define void @foo(i1 %x) {
|
|
|
|
; CHECK-NOOP: entry:
|
|
|
|
; CHECK-NOOP: br i1 %x, label %loop, label %exit
|
|
|
|
; CHECK-NOOP: loop:
|
|
|
|
; CHECK-NOOP: br label %loop
|
|
|
|
; CHECK-NOOP: exit:
|
2014-01-13 13:16:45 +08:00
|
|
|
; CHECK-NOOP: ret void
|
|
|
|
; CHECK-NOOP: }
|
|
|
|
|
2014-01-13 15:38:24 +08:00
|
|
|
; Round trip through bitcode.
|
|
|
|
; RUN: opt -f -o - -passes='no-op-module,no-op-module' %s \
|
|
|
|
; RUN: | llvm-dis \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-NOOP
|
|
|
|
|
2014-01-20 19:34:08 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager -verify-each -passes='no-op-module,function(no-op-function)' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-VERIFY-EACH
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-VERIFY-EACH: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-VERIFY-EACH: Running pass: VerifierPass
|
|
|
|
; CHECK-VERIFY-EACH: Running pass: NoOpModulePass
|
|
|
|
; CHECK-VERIFY-EACH: Running pass: VerifierPass
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-VERIFY-EACH: Starting llvm::Function pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-VERIFY-EACH: Running pass: NoOpFunctionPass
|
|
|
|
; CHECK-VERIFY-EACH: Running pass: VerifierPass
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-VERIFY-EACH: Finished llvm::Function pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-VERIFY-EACH: Running pass: VerifierPass
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-VERIFY-EACH: Finished llvm::Module pass manager run
|
2014-01-20 19:34:08 +08:00
|
|
|
|
|
|
|
; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='no-op-module,function(no-op-function)' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-NO-VERIFY
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-NO-VERIFY: Starting llvm::Module pass manager run
|
2014-01-20 19:34:08 +08:00
|
|
|
; CHECK-NO-VERIFY-NOT: VerifierPass
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-NO-VERIFY: Running pass: NoOpModulePass
|
2014-01-20 19:34:08 +08:00
|
|
|
; CHECK-NO-VERIFY-NOT: VerifierPass
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-NO-VERIFY: Starting llvm::Function pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-NO-VERIFY: Running pass: NoOpFunctionPass
|
2014-01-20 19:34:08 +08:00
|
|
|
; CHECK-NO-VERIFY-NOT: VerifierPass
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-NO-VERIFY: Finished llvm::Function pass manager run
|
2014-01-20 19:34:08 +08:00
|
|
|
; CHECK-NO-VERIFY-NOT: VerifierPass
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-NO-VERIFY: Finished llvm::Module pass manager run
|
2014-01-20 19:34:08 +08:00
|
|
|
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager \
|
2015-01-06 10:50:06 +08:00
|
|
|
; RUN: -passes='require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>))' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-ANALYSES
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-ANALYSES: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-ANALYSES: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-ANALYSES: Running analysis: NoOpModuleAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-ANALYSES: Starting llvm::LazyCallGraph::SCC pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-ANALYSES: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-ANALYSES: Running analysis: NoOpCGSCCAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-ANALYSES: Starting llvm::Function pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-ANALYSES: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-ANALYSES: Running analysis: NoOpFunctionAnalysis
|
2015-01-05 20:21:44 +08:00
|
|
|
|
2015-01-05 20:32:11 +08:00
|
|
|
; Make sure no-op passes that preserve all analyses don't even try to do any
|
|
|
|
; analysis invalidation.
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager \
|
2015-01-06 10:50:06 +08:00
|
|
|
; RUN: -passes='require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>))' %s 2>&1 \
|
2015-01-05 20:32:11 +08:00
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-NO-OP-INVALIDATION
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-NO-OP-INVALIDATION: Starting llvm::Module pass manager run
|
2015-01-05 20:32:11 +08:00
|
|
|
; CHECK-NO-OP-INVALIDATION-NOT: Invalidating all non-preserved analyses
|
|
|
|
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager \
|
2015-01-06 12:49:44 +08:00
|
|
|
; RUN: -passes='require<no-op-module>,require<no-op-module>,require<no-op-module>' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
|
|
|
|
; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS-NOT: Running analysis: NoOpModuleAnalysis
|
2015-01-06 12:49:44 +08:00
|
|
|
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager \
|
2015-01-06 12:49:44 +08:00
|
|
|
; RUN: -passes='require<no-op-module>,invalidate<no-op-module>,require<no-op-module>' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
|
|
|
|
; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Invalidating analysis: NoOpModuleAnalysis
|
|
|
|
; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis
|
2015-01-06 12:49:44 +08:00
|
|
|
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager \
|
2015-01-06 12:49:44 +08:00
|
|
|
; RUN: -passes='cgscc(require<no-op-cgscc>,require<no-op-cgscc>,require<no-op-cgscc>)' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
|
|
|
|
; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS-NOT: Running analysis: NoOpCGSCCAnalysis
|
2015-01-06 12:49:44 +08:00
|
|
|
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager \
|
2015-01-06 12:49:44 +08:00
|
|
|
; RUN: -passes='cgscc(require<no-op-cgscc>,invalidate<no-op-cgscc>,require<no-op-cgscc>)' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
|
|
|
|
; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Invalidating analysis: NoOpCGSCCAnalysis
|
|
|
|
; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis
|
2015-01-06 12:49:44 +08:00
|
|
|
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager \
|
2015-01-06 12:49:44 +08:00
|
|
|
; RUN: -passes='function(require<no-op-function>,require<no-op-function>,require<no-op-function>)' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
|
|
|
|
; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS-NOT: Running analysis: NoOpFunctionAnalysis
|
2015-01-06 12:49:44 +08:00
|
|
|
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager \
|
2015-01-06 12:49:44 +08:00
|
|
|
; RUN: -passes='function(require<no-op-function>,invalidate<no-op-function>,require<no-op-function>)' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
|
|
|
|
; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Invalidating analysis: NoOpFunctionAnalysis
|
|
|
|
; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis
|
2015-01-06 12:49:44 +08:00
|
|
|
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
[PM] Fix a pretty nasty bug where the new pass manager would invalidate
passes too many time.
I think this is actually the issue that someone raised with me at the
developer's meeting and in an email, but that we never really got to the
bottom of. Having all the testing utilities made it much easier to dig
down and uncover the core issue.
When a pass manager is running many passes over a single function, we
need it to invalidate the analyses between each run so that they can be
re-computed as needed. We also need to track the intersection of
preserved higher-level analyses across all the passes that we run (for
example, if there is one module analysis which all the function analyses
preserve, we want to track that and propagate it). Unfortunately, this
interacted poorly with any enclosing pass adaptor between two IR units.
It would see the intersection of preserved analyses, and need to
invalidate any other analyses, but some of the un-preserved analyses
might have already been invalidated *and recomputed*! We would fail to
propagate the fact that the analysis had already been invalidated.
The solution to this struck me as really strange at first, but the more
I thought about it, the more natural it seemed. After a nice discussion
with Duncan about it on IRC, it seemed even nicer. The idea is that
invalidating an analysis *causes* it to be preserved! Preserving the
lack of result is trivial. If it is recomputed, great. Until something
*else* invalidates it again, we're good.
The consequence of this is that the invalidate methods on the analysis
manager which operate over many passes now consume their
PreservedAnalyses object, update it to "preserve" every analysis pass to
which it delivers an invalidation (regardless of whether the pass
chooses to be removed, or handles the invalidation itself by updating
itself). Then we return this augmented set from the invalidate routine,
letting the pass manager take the result and use the intersection of
*that* across each pass run to compute the final preserved set. This
accounts for all the places where the early invalidation of an analysis
has already "preserved" it for a future run.
I've beefed up the testing and adjusted the assertions to show that we
no longer repeatedly invalidate or compute the analyses across nested
pass managers.
llvm-svn: 225333
2015-01-07 09:58:35 +08:00
|
|
|
; 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 \
|
2015-01-06 17:06:35 +08:00
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Starting llvm::Function pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Running pass: InvalidateAllAnalysesPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpFunctionAnalysis
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Finished llvm::Function pass manager run
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpModuleAnalysis
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Finished llvm::Module pass manager run
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-NOT: Invalidating analysis: NoOpModuleAnalysis
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-INVALIDATE-ALL: Finished llvm::Module pass manager run
|
[PM] Fix a pretty nasty bug where the new pass manager would invalidate
passes too many time.
I think this is actually the issue that someone raised with me at the
developer's meeting and in an email, but that we never really got to the
bottom of. Having all the testing utilities made it much easier to dig
down and uncover the core issue.
When a pass manager is running many passes over a single function, we
need it to invalidate the analyses between each run so that they can be
re-computed as needed. We also need to track the intersection of
preserved higher-level analyses across all the passes that we run (for
example, if there is one module analysis which all the function analyses
preserve, we want to track that and propagate it). Unfortunately, this
interacted poorly with any enclosing pass adaptor between two IR units.
It would see the intersection of preserved analyses, and need to
invalidate any other analyses, but some of the un-preserved analyses
might have already been invalidated *and recomputed*! We would fail to
propagate the fact that the analysis had already been invalidated.
The solution to this struck me as really strange at first, but the more
I thought about it, the more natural it seemed. After a nice discussion
with Duncan about it on IRC, it seemed even nicer. The idea is that
invalidating an analysis *causes* it to be preserved! Preserving the
lack of result is trivial. If it is recomputed, great. Until something
*else* invalidates it again, we're good.
The consequence of this is that the invalidate methods on the analysis
manager which operate over many passes now consume their
PreservedAnalyses object, update it to "preserve" every analysis pass to
which it delivers an invalidation (regardless of whether the pass
chooses to be removed, or handles the invalidation itself by updating
itself). Then we return this augmented set from the invalidate routine,
letting the pass manager take the result and use the intersection of
*that* across each pass run to compute the final preserved set. This
accounts for all the places where the early invalidation of an analysis
has already "preserved" it for a future run.
I've beefed up the testing and adjusted the assertions to show that we
no longer repeatedly invalidate or compute the analyses across nested
pass managers.
llvm-svn: 225333
2015-01-07 09:58:35 +08:00
|
|
|
|
2015-01-14 06:45:13 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
[PM] Fix a pretty nasty bug where the new pass manager would invalidate
passes too many time.
I think this is actually the issue that someone raised with me at the
developer's meeting and in an email, but that we never really got to the
bottom of. Having all the testing utilities made it much easier to dig
down and uncover the core issue.
When a pass manager is running many passes over a single function, we
need it to invalidate the analyses between each run so that they can be
re-computed as needed. We also need to track the intersection of
preserved higher-level analyses across all the passes that we run (for
example, if there is one module analysis which all the function analyses
preserve, we want to track that and propagate it). Unfortunately, this
interacted poorly with any enclosing pass adaptor between two IR units.
It would see the intersection of preserved analyses, and need to
invalidate any other analyses, but some of the un-preserved analyses
might have already been invalidated *and recomputed*! We would fail to
propagate the fact that the analysis had already been invalidated.
The solution to this struck me as really strange at first, but the more
I thought about it, the more natural it seemed. After a nice discussion
with Duncan about it on IRC, it seemed even nicer. The idea is that
invalidating an analysis *causes* it to be preserved! Preserving the
lack of result is trivial. If it is recomputed, great. Until something
*else* invalidates it again, we're good.
The consequence of this is that the invalidate methods on the analysis
manager which operate over many passes now consume their
PreservedAnalyses object, update it to "preserve" every analysis pass to
which it delivers an invalidation (regardless of whether the pass
chooses to be removed, or handles the invalidation itself by updating
itself). Then we return this augmented set from the invalidate routine,
letting the pass manager take the result and use the intersection of
*that* across each pass run to compute the final preserved set. This
accounts for all the places where the early invalidation of an analysis
has already "preserved" it for a future run.
I've beefed up the testing and adjusted the assertions to show that we
no longer repeatedly invalidate or compute the analyses across nested
pass managers.
llvm-svn: 225333
2015-01-07 09:58:35 +08:00
|
|
|
; 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 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL-CG
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Starting llvm::Module pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Starting llvm::LazyCallGraph::SCC pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Starting llvm::Function pass manager run
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running pass: InvalidateAllAnalysesPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpFunctionAnalysis
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Finished llvm::Function pass manager run
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpFunctionAnalysis
|
|
|
|
; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpCGSCCAnalysis
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Finished llvm::LazyCallGraph::SCC pass manager run
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpCGSCCAnalysis
|
|
|
|
; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpModuleAnalysis
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Finished llvm::Module pass manager run
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpModuleAnalysis
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass
|
2015-01-13 10:51:47 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-INVALIDATE-ALL-CG: Finished llvm::Module pass manager run
|
2015-01-06 17:06:35 +08:00
|
|
|
|
2015-01-15 19:39:46 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
|
|
|
|
; RUN: -passes='require<targetlibinfo>,invalidate<all>,require<targetlibinfo>' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-TLI
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-TLI: Starting llvm::Module pass manager run
|
2015-01-15 19:39:46 +08:00
|
|
|
; CHECK-TLI: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-TLI: Running analysis: TargetLibraryAnalysis
|
|
|
|
; CHECK-TLI: Running pass: InvalidateAllAnalysesPass
|
|
|
|
; CHECK-TLI-NOT: Invalidating analysis: TargetLibraryAnalysis
|
|
|
|
; CHECK-TLI: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-TLI-NOT: Running analysis: TargetLibraryAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-TLI: Finished llvm::Module pass manager run
|
2015-01-15 19:39:46 +08:00
|
|
|
|
2015-02-01 18:11:22 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
|
|
|
|
; RUN: -passes='require<targetir>,invalidate<all>,require<targetir>' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-TIRA
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-TIRA: Starting llvm::Module pass manager run
|
2015-02-01 18:11:22 +08:00
|
|
|
; CHECK-TIRA: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-TIRA: Running analysis: TargetIRAnalysis
|
|
|
|
; CHECK-TIRA: Running pass: InvalidateAllAnalysesPass
|
|
|
|
; CHECK-TIRA-NOT: Invalidating analysis: TargetIRAnalysis
|
|
|
|
; CHECK-TIRA: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-TIRA-NOT: Running analysis: TargetIRAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-TIRA: Finished llvm::Module pass manager run
|
2015-02-01 18:11:22 +08:00
|
|
|
|
2015-02-01 18:47:25 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
|
|
|
|
; RUN: -passes='require<domtree>' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-DT
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-DT: Starting llvm::Module pass manager run
|
2015-02-01 18:47:25 +08:00
|
|
|
; CHECK-DT: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-DT: Running analysis: DominatorTreeAnalysis
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-DT: Finished llvm::Module pass manager run
|
2015-02-01 18:47:25 +08:00
|
|
|
|
2016-02-14 07:46:24 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
|
|
|
|
; RUN: -passes='require<basic-aa>' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-BASIC-AA
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-BASIC-AA: Starting llvm::Module pass manager run
|
2016-02-14 07:46:24 +08:00
|
|
|
; CHECK-BASIC-AA: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-BASIC-AA: Running analysis: BasicAA
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-BASIC-AA: Finished llvm::Module pass manager run
|
2016-02-14 07:46:24 +08:00
|
|
|
|
2016-02-18 17:45:17 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
|
|
|
|
; RUN: -passes='require<aa>' -aa-pipeline='basic-aa' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-AA
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-AA: Starting llvm::Module pass manager run
|
2016-02-18 17:45:17 +08:00
|
|
|
; CHECK-AA: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-AA: Running analysis: AAManager
|
|
|
|
; CHECK-AA: Running analysis: BasicAA
|
2016-02-25 18:27:39 +08:00
|
|
|
; CHECK-AA: Finished llvm::Module pass manager run
|
2016-02-18 17:45:17 +08:00
|
|
|
|
2016-03-10 08:55:30 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
|
|
|
|
; RUN: -passes='require<memdep>' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-MEMDEP
|
|
|
|
; CHECK-MEMDEP: Starting llvm::Module pass manager run
|
|
|
|
; CHECK-MEMDEP: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-MEMDEP: Running analysis: MemoryDependenceAnalysis
|
|
|
|
; CHECK-MEMDEP: Finished llvm::Module pass manager run
|
|
|
|
|
2016-03-10 19:24:11 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
|
|
|
|
; RUN: -passes='require<callgraph>' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-CALLGRAPH
|
|
|
|
; CHECK-CALLGRAPH: Starting llvm::Module pass manager run
|
|
|
|
; CHECK-CALLGRAPH: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-CALLGRAPH: Running analysis: CallGraphAnalysis
|
|
|
|
; CHECK-CALLGRAPH: Finished llvm::Module pass manager run
|
|
|
|
|
2016-02-29 06:16:03 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
|
|
|
; RUN: -passes='default<O0>' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O2
|
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
|
|
|
; RUN: -passes='default<O1>' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O2
|
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
|
|
|
; RUN: -passes='default<O2>' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O2
|
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
|
|
|
; RUN: -passes='default<Os>' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O2
|
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
|
|
|
; RUN: -passes='default<Oz>' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O2
|
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
|
|
|
; RUN: -passes='lto-pre-link<O2>' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O2
|
|
|
|
; CHECK-O2: Starting llvm::Module pass manager run
|
|
|
|
; CHECK-O2: Running pass: SimplifyCFGPass
|
|
|
|
; CHECK-O2: Running pass: SROA
|
|
|
|
; CHECK-O2: Running pass: EarlyCSEPass
|
|
|
|
; CHECK-O2: Running pass: LowerExpectIntrinsicPass
|
|
|
|
|
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
|
|
|
; RUN: -passes='lto<O2>' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-LTO-O2
|
|
|
|
; CHECK-LTO-O2: Starting llvm::Module pass manager run
|
|
|
|
; CHECK-LTO-O2: Running pass: InstCombinePass
|
|
|
|
; CHECK-LTO-O2: Running pass: SimplifyCFGPass
|
|
|
|
|
2016-08-03 15:44:48 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
|
|
|
; RUN: -passes='repeat<3>(no-op-module)' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-MODULE-PASS
|
|
|
|
; CHECK-REPEAT-MODULE-PASS: Starting llvm::Module pass manager run
|
2016-08-04 11:52:53 +08:00
|
|
|
; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: RepeatedPass
|
2016-08-03 15:44:48 +08:00
|
|
|
; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run
|
|
|
|
; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
|
|
|
|
; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run
|
|
|
|
; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run
|
|
|
|
; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
|
|
|
|
; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run
|
|
|
|
; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run
|
|
|
|
; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
|
|
|
|
; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run
|
|
|
|
; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run
|
|
|
|
|
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
|
|
|
; RUN: -passes='cgscc(repeat<3>(no-op-cgscc))' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-CGSCC-PASS
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS: Starting llvm::Module pass manager run
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: ModuleToPostOrderCGSCCPassAdaptor
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running an SCC pass across the RefSCC: [(foo)]
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting llvm::LazyCallGraph::SCC pass manager run
|
2016-08-04 11:52:53 +08:00
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: RepeatedPass
|
2016-08-03 15:44:48 +08:00
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting llvm::LazyCallGraph::SCC pass manager run
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished llvm::LazyCallGraph::SCC pass manager run
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting llvm::LazyCallGraph::SCC pass manager run
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished llvm::LazyCallGraph::SCC pass manager run
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting llvm::LazyCallGraph::SCC pass manager run
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished llvm::LazyCallGraph::SCC pass manager run
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished llvm::LazyCallGraph::SCC pass manager run
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished llvm::Module pass manager run
|
|
|
|
|
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
|
|
|
; RUN: -passes='function(repeat<3>(no-op-function))' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-FUNCTION-PASS
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS: Starting llvm::Module pass manager run
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: ModuleToFunctionPassAdaptor
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run
|
2016-08-04 11:52:53 +08:00
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: RepeatedPass
|
2016-08-03 15:44:48 +08:00
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Module pass manager run
|
|
|
|
|
|
|
|
; RUN: opt -disable-output -disable-verify -debug-pass-manager \
|
|
|
|
; RUN: -passes='loop(repeat<3>(no-op-loop))' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-LOOP-PASS
|
|
|
|
; CHECK-REPEAT-LOOP-PASS: Starting llvm::Module pass manager run
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: ModuleToFunctionPassAdaptor
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Function pass manager run
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: FunctionToLoopPassAdaptor
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: LoopAnalysis
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: DominatorTreeAnalysis
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Loop pass manager run
|
2016-08-04 11:52:53 +08:00
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: RepeatedPass
|
2016-08-03 15:44:48 +08:00
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Loop pass manager run
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Loop pass manager run
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Loop pass manager run
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Loop pass manager run
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Loop pass manager run
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Loop pass manager run
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Loop pass manager run
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Function pass manager run
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Module pass manager run
|
|
|
|
|
|
|
|
define void @foo(i1 %x) {
|
|
|
|
entry:
|
|
|
|
br i1 %x, label %loop, label %exit
|
|
|
|
|
|
|
|
loop:
|
|
|
|
br label %loop
|
|
|
|
|
|
|
|
exit:
|
2014-01-12 20:15:39 +08:00
|
|
|
ret void
|
|
|
|
}
|
2015-02-01 18:47:25 +08:00
|
|
|
|
|
|
|
declare void @bar()
|