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.
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -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
|
2021-05-04 07:09:56 +08:00
|
|
|
; CHECK-MODULE-PASS: Running pass: NoOpModulePass
|
2015-01-06 16:37:58 +08:00
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -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
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -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
|
2021-05-04 07:09:56 +08:00
|
|
|
; CHECK-CGSCC-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}},{{.*}}Module>
|
2016-12-22 15:53:20 +08:00
|
|
|
; CHECK-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(FunctionAnalysisManager|AnalysisManager<.*Function.*>).*}},{{.*}}Module>
|
2016-02-26 19:44:45 +08:00
|
|
|
; CHECK-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis
|
2017-07-15 16:08:19 +08:00
|
|
|
; CHECK-CGSCC-PASS-NEXT: Running analysis: TargetLibraryAnalysis
|
2019-03-28 08:51:36 +08:00
|
|
|
; CHECK-CGSCC-PASS-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
|
|
|
|
; CHECK-CGSCC-PASS-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}>
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
|
2015-01-06 16:37:58 +08:00
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -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
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -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
|
2021-05-04 07:09:56 +08:00
|
|
|
; CHECK-FUNCTION-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
|
2021-04-06 12:55:18 +08:00
|
|
|
; CHECK-FUNCTION-PASS-NEXT: Running analysis: PreservedCFGCheckerAnalysis on foo
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
|
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
|
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-12-27 16:44:39 +08:00
|
|
|
; CHECK-MODULE-PRINT: define void @foo(i1 %x, i8* %p1, i8* %p2)
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-MODULE-PRINT: Running pass: VerifierPass
|
2014-01-12 20:15:39 +08:00
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager -disable-verify -verify-cfg-preserved=1 -passes='print,verify' %s 2>&1 \
|
2015-01-05 08:08:53 +08:00
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-VERIFY
|
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-12-27 16:44:39 +08:00
|
|
|
; CHECK-MODULE-VERIFY: define void @foo(i1 %x, i8* %p1, i8* %p2)
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-MODULE-VERIFY: Running pass: VerifierPass
|
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
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-FUNCTION-PRINT: Running pass: VerifierPass
|
2016-02-27 19:07:16 +08:00
|
|
|
; CHECK-FUNCTION-PRINT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
|
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-12-27 16:44:39 +08:00
|
|
|
; CHECK-FUNCTION-PRINT: define void @foo(i1 %x, i8* %p1, i8* %p2)
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-FUNCTION-PRINT: Running pass: VerifierPass
|
2014-01-12 20:15:39 +08:00
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager -disable-verify -verify-cfg-preserved=1 -passes='function(print,verify)' %s 2>&1 \
|
2015-01-05 08:08:53 +08:00
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-VERIFY
|
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-12-27 16:44:39 +08:00
|
|
|
; CHECK-FUNCTION-VERIFY: define void @foo(i1 %x, i8* %p1, i8* %p2)
|
2015-01-13 19:13:56 +08:00
|
|
|
; CHECK-FUNCTION-VERIFY: Running pass: VerifierPass
|
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-12-27 16:44:39 +08:00
|
|
|
; CHECK-NOOP: define void @foo(i1 %x, i8* %p1, i8* %p2) {
|
2016-08-03 15:44:48 +08:00
|
|
|
; CHECK-NOOP: entry:
|
2016-12-27 16:44:39 +08:00
|
|
|
; CHECK-NOOP: store i8 42, i8* %p1
|
2016-08-03 15:44:48 +08:00
|
|
|
; CHECK-NOOP: br i1 %x, label %loop, label %exit
|
|
|
|
; CHECK-NOOP: loop:
|
2016-12-27 16:44:39 +08:00
|
|
|
; CHECK-NOOP: %tmp1 = load i8, i8* %p2
|
2016-08-03 15:44:48 +08:00
|
|
|
; 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
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -debug-pass-manager -disable-verify -verify-cfg-preserved=1 -passes='no-op-module,function(no-op-function)' %s 2>&1 \
|
2014-01-20 19:34:08 +08:00
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-NO-VERIFY
|
|
|
|
; 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
|
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
|
|
|
|
; CHECK-NO-VERIFY-NOT: VerifierPass
|
|
|
|
|
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
|
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
|
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
|
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
|
2021-05-04 07:09:56 +08:00
|
|
|
; CHECK-NO-OP-INVALIDATION-NOT: Invalidat
|
2015-01-05 20:32:11 +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>,require<no-op-module>,require<no-op-module>' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS
|
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
|
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
|
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
|
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
|
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
|
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
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -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
|
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
|
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
|
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
|
|
|
|
; 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
|
|
|
|
; 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
|
[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
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -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
|
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
|
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
|
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
|
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
|
|
|
|
; 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
|
|
|
|
; 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
|
|
|
|
; 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
|
2015-01-06 17:06:35 +08:00
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
|
2015-01-15 19:39:46 +08:00
|
|
|
; RUN: -passes='require<targetlibinfo>,invalidate<all>,require<targetlibinfo>' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-TLI
|
|
|
|
; 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
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
|
2015-02-01 18:11:22 +08:00
|
|
|
; RUN: -passes='require<targetir>,invalidate<all>,require<targetir>' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-TIRA
|
|
|
|
; 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
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
|
2015-02-01 18:47:25 +08:00
|
|
|
; RUN: -passes='require<domtree>' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-DT
|
|
|
|
; CHECK-DT: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-DT: Running analysis: DominatorTreeAnalysis
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
|
2016-02-14 07:46:24 +08:00
|
|
|
; RUN: -passes='require<basic-aa>' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-BASIC-AA
|
|
|
|
; CHECK-BASIC-AA: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-BASIC-AA: Running analysis: BasicAA
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
|
2016-02-18 17:45:17 +08:00
|
|
|
; RUN: -passes='require<aa>' -aa-pipeline='basic-aa' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-AA
|
|
|
|
; CHECK-AA: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-AA: Running analysis: AAManager
|
|
|
|
; CHECK-AA: Running analysis: BasicAA
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
|
2016-12-24 04:38:19 +08:00
|
|
|
; RUN: -passes='require<aa>' -aa-pipeline='default' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-AA-DEFAULT
|
|
|
|
; CHECK-AA-DEFAULT: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-AA-DEFAULT: Running analysis: AAManager
|
|
|
|
; CHECK-AA-DEFAULT: Running analysis: BasicAA
|
|
|
|
; CHECK-AA-DEFAULT: Running analysis: ScopedNoAliasAA
|
|
|
|
; CHECK-AA-DEFAULT: Running analysis: TypeBasedAA
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
|
2016-12-27 18:30:45 +08:00
|
|
|
; RUN: -passes='require<aa>,invalidate<domtree>,aa-eval' -aa-pipeline='basic-aa' \
|
2016-12-27 16:44:39 +08:00
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-AA-FUNCTION-INVALIDATE
|
|
|
|
; CHECK-AA-FUNCTION-INVALIDATE: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: AAManager
|
|
|
|
; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: BasicAA
|
|
|
|
; CHECK-AA-FUNCTION-INVALIDATE: Running pass: InvalidateAnalysisPass
|
2016-12-27 18:30:45 +08:00
|
|
|
; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: DominatorTreeAnalysis
|
2016-12-27 16:44:39 +08:00
|
|
|
; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: BasicAA
|
|
|
|
; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: AAManager
|
|
|
|
; CHECK-AA-FUNCTION-INVALIDATE: Running pass: AAEvaluator
|
|
|
|
; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: AAManager
|
|
|
|
; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: BasicAA
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
|
2016-12-27 16:44:39 +08:00
|
|
|
; RUN: -passes='require<globals-aa>,function(require<aa>),invalidate<globals-aa>,require<globals-aa>,function(aa-eval)' -aa-pipeline='globals-aa' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-AA-MODULE-INVALIDATE
|
|
|
|
; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-AA-MODULE-INVALIDATE: Running analysis: GlobalsAA
|
|
|
|
; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-AA-MODULE-INVALIDATE: Running analysis: AAManager
|
|
|
|
; CHECK-AA-MODULE-INVALIDATE: Running pass: InvalidateAnalysisPass
|
|
|
|
; CHECK-AA-MODULE-INVALIDATE: Invalidating analysis: GlobalsAA
|
|
|
|
; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-AA-MODULE-INVALIDATE: Running analysis: GlobalsAA
|
|
|
|
; CHECK-AA-MODULE-INVALIDATE: Running pass: AAEvaluator
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
|
2016-03-10 08:55:30 +08:00
|
|
|
; RUN: -passes='require<memdep>' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-MEMDEP
|
|
|
|
; CHECK-MEMDEP: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-MEMDEP: Running analysis: MemoryDependenceAnalysis
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager %s 2>&1 \
|
2016-03-10 19:24:11 +08:00
|
|
|
; RUN: -passes='require<callgraph>' \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-CALLGRAPH
|
|
|
|
; CHECK-CALLGRAPH: Running pass: RequireAnalysisPass
|
|
|
|
; CHECK-CALLGRAPH: Running analysis: CallGraphAnalysis
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
|
2020-11-08 16:18:42 +08:00
|
|
|
; RUN: -passes='default<O0>' %s 2>&1 \
|
2020-11-09 05:51:29 +08:00
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O0 --check-prefix=%llvmcheckext
|
2021-05-04 07:09:56 +08:00
|
|
|
; CHECK-O0: Running pass: AlwaysInlinerPass
|
2020-11-17 04:48:42 +08:00
|
|
|
; CHECK-O0-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
|
|
|
|
; CHECK-O0-NEXT: Running analysis: ProfileSummaryAnalysis
|
2020-11-09 05:51:29 +08:00
|
|
|
; CHECK-EXT-NEXT: Running pass: {{.*}}Bye
|
2021-01-16 10:19:56 +08:00
|
|
|
; We don't have checks for CHECK-NOEXT here, but this simplifies the test, while
|
|
|
|
; avoiding FileCheck complaining about the unused prefix.
|
|
|
|
; CHECK-NOEXT: {{.*}}
|
2016-12-22 14:59:15 +08:00
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
|
2016-08-03 15:44:48 +08:00
|
|
|
; RUN: -passes='repeat<3>(no-op-module)' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-MODULE-PASS
|
2021-05-04 07:09:56 +08:00
|
|
|
; CHECK-REPEAT-MODULE-PASS: Running pass: RepeatedPass
|
2016-08-03 15:44:48 +08:00
|
|
|
; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
|
|
|
|
; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
|
|
|
|
; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
|
2016-08-03 15:44:48 +08:00
|
|
|
; RUN: -passes='cgscc(repeat<3>(no-op-cgscc))' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-CGSCC-PASS
|
2021-05-04 07:09:56 +08:00
|
|
|
; CHECK-REPEAT-CGSCC-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}},{{.*}}Module>
|
2016-12-22 15:53:20 +08:00
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(FunctionAnalysisManager|AnalysisManager<.*Function.*>).*}},{{.*}}Module>
|
2016-08-03 15:44:48 +08:00
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis
|
2017-07-15 16:08:19 +08:00
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: TargetLibraryAnalysis
|
2019-03-28 08:51:36 +08:00
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}>
|
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: Running pass: NoOpCGSCCPass
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
|
|
|
|
; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
|
2016-08-03 15:44:48 +08:00
|
|
|
; RUN: -passes='function(repeat<3>(no-op-function))' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-FUNCTION-PASS
|
2021-05-04 07:09:56 +08:00
|
|
|
; CHECK-REPEAT-FUNCTION-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
|
2021-04-06 12:55:18 +08:00
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running analysis: PreservedCFGCheckerAnalysis on foo
|
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: Running pass: NoOpFunctionPass
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
|
|
|
|
; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass
|
|
|
|
|
2021-04-06 12:55:18 +08:00
|
|
|
; RUN: opt -disable-output -disable-verify -verify-cfg-preserved=1 -debug-pass-manager \
|
2016-08-03 15:44:48 +08:00
|
|
|
; RUN: -passes='loop(repeat<3>(no-op-loop))' %s 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-LOOP-PASS
|
2021-05-04 07:09:56 +08:00
|
|
|
; CHECK-REPEAT-LOOP-PASS: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
|
2021-04-06 12:55:18 +08:00
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: PreservedCFGCheckerAnalysis on foo
|
2017-12-29 16:16:06 +08:00
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: LoopSimplify
|
2016-08-03 15:44:48 +08:00
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: LoopAnalysis
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: DominatorTreeAnalysis
|
2017-01-21 11:48:51 +08:00
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: AssumptionAnalysis
|
2021-04-06 12:55:18 +08:00
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Invalidating analysis: PreservedCFGCheckerAnalysis on foo
|
2017-12-29 16:16:06 +08:00
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: LCSSAPass
|
2021-04-06 12:55:18 +08:00
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: PreservedCFGCheckerAnalysis on foo
|
2016-12-22 14:59:15 +08:00
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: AAManager
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TargetLibraryAnalysis
|
2021-01-21 08:53:03 +08:00
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: BasicAA
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: ScopedNoAliasAA
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TypeBasedAA
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: OuterAnalysisManagerProxy
|
2017-01-11 14:23:21 +08:00
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: ScalarEvolutionAnalysis
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TargetIRAnalysis
|
2017-02-10 16:26:58 +08:00
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}>
|
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: Running pass: NoOpLoopPass
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
|
|
|
|
; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass
|
|
|
|
|
2016-12-27 16:44:39 +08:00
|
|
|
define void @foo(i1 %x, i8* %p1, i8* %p2) {
|
2016-08-03 15:44:48 +08:00
|
|
|
entry:
|
2016-12-27 16:44:39 +08:00
|
|
|
store i8 42, i8* %p1
|
2016-08-03 15:44:48 +08:00
|
|
|
br i1 %x, label %loop, label %exit
|
|
|
|
|
|
|
|
loop:
|
2016-12-27 16:44:39 +08:00
|
|
|
%tmp1 = load i8, i8* %p2
|
2016-08-03 15:44:48 +08:00
|
|
|
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()
|