2017-01-24 08:57:39 +08:00
|
|
|
; Basic test for the new LTO pipeline.
|
|
|
|
; For now the only difference is between -O1 and everything else, so
|
|
|
|
; -O2, -O3, -Os, -Oz are the same.
|
|
|
|
|
[NewPM] Only invalidate modified functions' analyses in CGSCC passes + turn on eagerly invalidate analyses
Previously, any change in any function in an SCC would cause all
analyses for all functions in the SCC to be invalidated. With this
change, we now manually invalidate analyses for functions we modify,
then let the pass manager know that all function analyses should be
preserved since we've already handled function analysis invalidation.
So far this only touches the inliner, argpromotion, function-attrs, and
updateCGAndAnalysisManager(), since they are the most used.
This is part of an effort to investigate running the function
simplification pipeline less on functions we visit multiple times in the
inliner pipeline.
However, this causes major memory regressions especially on larger IR.
To counteract this, turn on the option to eagerly invalidate function
analyses. This invalidates analyses on functions immediately after
they're processed in a module or scc to function adaptor for specific
parts of the pipeline.
Within an SCC, if a pass only modifies one function, other functions in
the SCC do not have their analyses invalidated, so in later function
passes in the SCC pass manager the analyses may still be cached. It is
only after the function passes that the eager invalidation takes effect.
For the default pipelines this makes sense because the inliner pipeline
runs the function simplification pipeline after all other SCC passes
(except CoroSplit which doesn't request any analyses).
Overall this has mostly positive effects on compile time and positive effects on memory usage.
https://llvm-compile-time-tracker.com/compare.php?from=7f627596977624730f9298a1b69883af1555765e&to=39e824e0d3ca8a517502f13032dfa67304841c90&stat=instructions
https://llvm-compile-time-tracker.com/compare.php?from=7f627596977624730f9298a1b69883af1555765e&to=39e824e0d3ca8a517502f13032dfa67304841c90&stat=max-rss
D113196 shows that we slightly regressed compile times in exchange for
some memory improvements when turning on eager invalidation. D100917
shows that we slightly improved compile times in exchange for major
memory regressions in some cases when invalidating less in SCC passes.
Turning these on at the same time keeps the memory improvements while
keeping compile times neutral/slightly positive.
Reviewed By: asbirlea, nikic
Differential Revision: https://reviews.llvm.org/D113304
2021-05-04 07:50:26 +08:00
|
|
|
; RUN: opt -disable-verify -verify-cfg-preserved=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
|
2017-01-24 08:57:39 +08:00
|
|
|
; RUN: -passes='lto<O1>' -S %s 2>&1 \
|
2017-07-28 00:54:15 +08:00
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O1
|
[NewPM] Only invalidate modified functions' analyses in CGSCC passes + turn on eagerly invalidate analyses
Previously, any change in any function in an SCC would cause all
analyses for all functions in the SCC to be invalidated. With this
change, we now manually invalidate analyses for functions we modify,
then let the pass manager know that all function analyses should be
preserved since we've already handled function analysis invalidation.
So far this only touches the inliner, argpromotion, function-attrs, and
updateCGAndAnalysisManager(), since they are the most used.
This is part of an effort to investigate running the function
simplification pipeline less on functions we visit multiple times in the
inliner pipeline.
However, this causes major memory regressions especially on larger IR.
To counteract this, turn on the option to eagerly invalidate function
analyses. This invalidates analyses on functions immediately after
they're processed in a module or scc to function adaptor for specific
parts of the pipeline.
Within an SCC, if a pass only modifies one function, other functions in
the SCC do not have their analyses invalidated, so in later function
passes in the SCC pass manager the analyses may still be cached. It is
only after the function passes that the eager invalidation takes effect.
For the default pipelines this makes sense because the inliner pipeline
runs the function simplification pipeline after all other SCC passes
(except CoroSplit which doesn't request any analyses).
Overall this has mostly positive effects on compile time and positive effects on memory usage.
https://llvm-compile-time-tracker.com/compare.php?from=7f627596977624730f9298a1b69883af1555765e&to=39e824e0d3ca8a517502f13032dfa67304841c90&stat=instructions
https://llvm-compile-time-tracker.com/compare.php?from=7f627596977624730f9298a1b69883af1555765e&to=39e824e0d3ca8a517502f13032dfa67304841c90&stat=max-rss
D113196 shows that we slightly regressed compile times in exchange for
some memory improvements when turning on eager invalidation. D100917
shows that we slightly improved compile times in exchange for major
memory regressions in some cases when invalidating less in SCC passes.
Turning these on at the same time keeps the memory improvements while
keeping compile times neutral/slightly positive.
Reviewed By: asbirlea, nikic
Differential Revision: https://reviews.llvm.org/D113304
2021-05-04 07:50:26 +08:00
|
|
|
; RUN: opt -disable-verify -verify-cfg-preserved=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
|
2022-02-26 04:02:37 +08:00
|
|
|
; RUN: -passes='lto<O1>' -S %s -passes-ep-full-link-time-optimization-early=no-op-module \
|
|
|
|
; RUN: -passes-ep-full-link-time-optimization-last=no-op-module 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O1 --check-prefix=CHECK-EP
|
|
|
|
; RUN: opt -disable-verify -verify-cfg-preserved=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
|
2017-01-24 08:57:39 +08:00
|
|
|
; RUN: -passes='lto<O2>' -S %s 2>&1 \
|
2021-02-18 00:56:28 +08:00
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O23SZ \
|
|
|
|
; RUN: --check-prefix=CHECK-O2
|
[NewPM] Only invalidate modified functions' analyses in CGSCC passes + turn on eagerly invalidate analyses
Previously, any change in any function in an SCC would cause all
analyses for all functions in the SCC to be invalidated. With this
change, we now manually invalidate analyses for functions we modify,
then let the pass manager know that all function analyses should be
preserved since we've already handled function analysis invalidation.
So far this only touches the inliner, argpromotion, function-attrs, and
updateCGAndAnalysisManager(), since they are the most used.
This is part of an effort to investigate running the function
simplification pipeline less on functions we visit multiple times in the
inliner pipeline.
However, this causes major memory regressions especially on larger IR.
To counteract this, turn on the option to eagerly invalidate function
analyses. This invalidates analyses on functions immediately after
they're processed in a module or scc to function adaptor for specific
parts of the pipeline.
Within an SCC, if a pass only modifies one function, other functions in
the SCC do not have their analyses invalidated, so in later function
passes in the SCC pass manager the analyses may still be cached. It is
only after the function passes that the eager invalidation takes effect.
For the default pipelines this makes sense because the inliner pipeline
runs the function simplification pipeline after all other SCC passes
(except CoroSplit which doesn't request any analyses).
Overall this has mostly positive effects on compile time and positive effects on memory usage.
https://llvm-compile-time-tracker.com/compare.php?from=7f627596977624730f9298a1b69883af1555765e&to=39e824e0d3ca8a517502f13032dfa67304841c90&stat=instructions
https://llvm-compile-time-tracker.com/compare.php?from=7f627596977624730f9298a1b69883af1555765e&to=39e824e0d3ca8a517502f13032dfa67304841c90&stat=max-rss
D113196 shows that we slightly regressed compile times in exchange for
some memory improvements when turning on eager invalidation. D100917
shows that we slightly improved compile times in exchange for major
memory regressions in some cases when invalidating less in SCC passes.
Turning these on at the same time keeps the memory improvements while
keeping compile times neutral/slightly positive.
Reviewed By: asbirlea, nikic
Differential Revision: https://reviews.llvm.org/D113304
2021-05-04 07:50:26 +08:00
|
|
|
; RUN: opt -disable-verify -verify-cfg-preserved=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
|
2022-02-26 04:02:37 +08:00
|
|
|
; RUN: -passes='lto<O2>' -S %s -passes-ep-full-link-time-optimization-early=no-op-module \
|
|
|
|
; RUN: -passes-ep-full-link-time-optimization-last=no-op-module 2>&1 \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O23SZ \
|
|
|
|
; RUN: --check-prefix=CHECK-O2 --check-prefix=CHECK-EP
|
|
|
|
; RUN: opt -disable-verify -verify-cfg-preserved=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
|
2017-01-24 08:57:39 +08:00
|
|
|
; RUN: -passes='lto<O3>' -S %s 2>&1 \
|
2021-02-18 00:56:28 +08:00
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O23SZ \
|
2018-01-25 20:06:32 +08:00
|
|
|
; RUN: --check-prefix=CHECK-O3
|
[NewPM] Only invalidate modified functions' analyses in CGSCC passes + turn on eagerly invalidate analyses
Previously, any change in any function in an SCC would cause all
analyses for all functions in the SCC to be invalidated. With this
change, we now manually invalidate analyses for functions we modify,
then let the pass manager know that all function analyses should be
preserved since we've already handled function analysis invalidation.
So far this only touches the inliner, argpromotion, function-attrs, and
updateCGAndAnalysisManager(), since they are the most used.
This is part of an effort to investigate running the function
simplification pipeline less on functions we visit multiple times in the
inliner pipeline.
However, this causes major memory regressions especially on larger IR.
To counteract this, turn on the option to eagerly invalidate function
analyses. This invalidates analyses on functions immediately after
they're processed in a module or scc to function adaptor for specific
parts of the pipeline.
Within an SCC, if a pass only modifies one function, other functions in
the SCC do not have their analyses invalidated, so in later function
passes in the SCC pass manager the analyses may still be cached. It is
only after the function passes that the eager invalidation takes effect.
For the default pipelines this makes sense because the inliner pipeline
runs the function simplification pipeline after all other SCC passes
(except CoroSplit which doesn't request any analyses).
Overall this has mostly positive effects on compile time and positive effects on memory usage.
https://llvm-compile-time-tracker.com/compare.php?from=7f627596977624730f9298a1b69883af1555765e&to=39e824e0d3ca8a517502f13032dfa67304841c90&stat=instructions
https://llvm-compile-time-tracker.com/compare.php?from=7f627596977624730f9298a1b69883af1555765e&to=39e824e0d3ca8a517502f13032dfa67304841c90&stat=max-rss
D113196 shows that we slightly regressed compile times in exchange for
some memory improvements when turning on eager invalidation. D100917
shows that we slightly improved compile times in exchange for major
memory regressions in some cases when invalidating less in SCC passes.
Turning these on at the same time keeps the memory improvements while
keeping compile times neutral/slightly positive.
Reviewed By: asbirlea, nikic
Differential Revision: https://reviews.llvm.org/D113304
2021-05-04 07:50:26 +08:00
|
|
|
; RUN: opt -disable-verify -verify-cfg-preserved=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
|
2017-01-24 08:57:39 +08:00
|
|
|
; RUN: -passes='lto<Os>' -S %s 2>&1 \
|
2021-02-18 00:56:28 +08:00
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O23SZ \
|
|
|
|
; RUN: --check-prefix=CHECK-OS
|
[NewPM] Only invalidate modified functions' analyses in CGSCC passes + turn on eagerly invalidate analyses
Previously, any change in any function in an SCC would cause all
analyses for all functions in the SCC to be invalidated. With this
change, we now manually invalidate analyses for functions we modify,
then let the pass manager know that all function analyses should be
preserved since we've already handled function analysis invalidation.
So far this only touches the inliner, argpromotion, function-attrs, and
updateCGAndAnalysisManager(), since they are the most used.
This is part of an effort to investigate running the function
simplification pipeline less on functions we visit multiple times in the
inliner pipeline.
However, this causes major memory regressions especially on larger IR.
To counteract this, turn on the option to eagerly invalidate function
analyses. This invalidates analyses on functions immediately after
they're processed in a module or scc to function adaptor for specific
parts of the pipeline.
Within an SCC, if a pass only modifies one function, other functions in
the SCC do not have their analyses invalidated, so in later function
passes in the SCC pass manager the analyses may still be cached. It is
only after the function passes that the eager invalidation takes effect.
For the default pipelines this makes sense because the inliner pipeline
runs the function simplification pipeline after all other SCC passes
(except CoroSplit which doesn't request any analyses).
Overall this has mostly positive effects on compile time and positive effects on memory usage.
https://llvm-compile-time-tracker.com/compare.php?from=7f627596977624730f9298a1b69883af1555765e&to=39e824e0d3ca8a517502f13032dfa67304841c90&stat=instructions
https://llvm-compile-time-tracker.com/compare.php?from=7f627596977624730f9298a1b69883af1555765e&to=39e824e0d3ca8a517502f13032dfa67304841c90&stat=max-rss
D113196 shows that we slightly regressed compile times in exchange for
some memory improvements when turning on eager invalidation. D100917
shows that we slightly improved compile times in exchange for major
memory regressions in some cases when invalidating less in SCC passes.
Turning these on at the same time keeps the memory improvements while
keeping compile times neutral/slightly positive.
Reviewed By: asbirlea, nikic
Differential Revision: https://reviews.llvm.org/D113304
2021-05-04 07:50:26 +08:00
|
|
|
; RUN: opt -disable-verify -verify-cfg-preserved=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
|
2017-01-24 08:57:39 +08:00
|
|
|
; RUN: -passes='lto<Oz>' -S %s 2>&1 \
|
2021-02-18 00:56:28 +08:00
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O23SZ
|
[NewPM] Only invalidate modified functions' analyses in CGSCC passes + turn on eagerly invalidate analyses
Previously, any change in any function in an SCC would cause all
analyses for all functions in the SCC to be invalidated. With this
change, we now manually invalidate analyses for functions we modify,
then let the pass manager know that all function analyses should be
preserved since we've already handled function analysis invalidation.
So far this only touches the inliner, argpromotion, function-attrs, and
updateCGAndAnalysisManager(), since they are the most used.
This is part of an effort to investigate running the function
simplification pipeline less on functions we visit multiple times in the
inliner pipeline.
However, this causes major memory regressions especially on larger IR.
To counteract this, turn on the option to eagerly invalidate function
analyses. This invalidates analyses on functions immediately after
they're processed in a module or scc to function adaptor for specific
parts of the pipeline.
Within an SCC, if a pass only modifies one function, other functions in
the SCC do not have their analyses invalidated, so in later function
passes in the SCC pass manager the analyses may still be cached. It is
only after the function passes that the eager invalidation takes effect.
For the default pipelines this makes sense because the inliner pipeline
runs the function simplification pipeline after all other SCC passes
(except CoroSplit which doesn't request any analyses).
Overall this has mostly positive effects on compile time and positive effects on memory usage.
https://llvm-compile-time-tracker.com/compare.php?from=7f627596977624730f9298a1b69883af1555765e&to=39e824e0d3ca8a517502f13032dfa67304841c90&stat=instructions
https://llvm-compile-time-tracker.com/compare.php?from=7f627596977624730f9298a1b69883af1555765e&to=39e824e0d3ca8a517502f13032dfa67304841c90&stat=max-rss
D113196 shows that we slightly regressed compile times in exchange for
some memory improvements when turning on eager invalidation. D100917
shows that we slightly improved compile times in exchange for major
memory regressions in some cases when invalidating less in SCC passes.
Turning these on at the same time keeps the memory improvements while
keeping compile times neutral/slightly positive.
Reviewed By: asbirlea, nikic
Differential Revision: https://reviews.llvm.org/D113304
2021-05-04 07:50:26 +08:00
|
|
|
; RUN: opt -disable-verify -verify-cfg-preserved=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
|
[PM] Enable registration of out-of-tree passes with PassBuilder
Summary:
This patch adds a callback registration API to the PassBuilder,
enabling registering out-of-tree passes with it.
Through the Callback API, callers may register callbacks with the
various stages at which passes are added into pass managers, including
parsing of a pass pipeline as well as at extension points within the
default -O pipelines.
Registering utilities like `require<>` and `invalidate<>` needs to be
handled manually by the caller, but a helper is provided.
Additionally, adding passes at pipeline extension points is exposed
through the opt tool. This patch adds a `-passes-ep-X` commandline
option for every extension point X, which opt parses into pipelines
inserted into that extension point.
Reviewers: chandlerc
Reviewed By: chandlerc
Subscribers: lksbhm, grosser, davide, mehdi_amini, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D33464
llvm-svn: 307532
2017-07-10 18:57:55 +08:00
|
|
|
; RUN: -passes='lto<O3>' -S %s -passes-ep-peephole='no-op-function' 2>&1 \
|
2021-02-18 00:56:28 +08:00
|
|
|
; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O23SZ \
|
2018-01-25 20:06:32 +08:00
|
|
|
; RUN: --check-prefix=CHECK-O3 --check-prefix=CHECK-EP-Peephole
|
2017-01-24 08:57:39 +08:00
|
|
|
|
2021-05-04 07:09:56 +08:00
|
|
|
; CHECK-O: Running pass: Annotation2Metadata
|
2022-02-26 04:02:37 +08:00
|
|
|
; CHECK-EP-NEXT: Running pass: NoOpModulePass
|
2021-07-24 03:16:22 +08:00
|
|
|
; CHECK-O-NEXT: Running pass: CrossDSOCFIPass
|
2022-01-22 04:43:20 +08:00
|
|
|
; CHECK-O-NEXT: Running pass: OpenMPOptPass
|
2017-01-24 08:57:39 +08:00
|
|
|
; CHECK-O-NEXT: Running pass: GlobalDCEPass
|
|
|
|
; CHECK-O-NEXT: Running pass: ForceFunctionAttrsPass
|
|
|
|
; CHECK-O-NEXT: Running pass: InferFunctionAttrsPass
|
Change TargetLibraryInfo analysis passes to always require Function
Summary:
This is the first change to enable the TLI to be built per-function so
that -fno-builtin* handling can be migrated to use function attributes.
See discussion on D61634 for background. This is an enabler for fixing
handling of these options for LTO, for example.
This change should not affect behavior, as the provided function is not
yet used to build a specifically per-function TLI, but rather enables
that migration.
Most of the changes were very mechanical, e.g. passing a Function to the
legacy analysis pass's getTLI interface, or in Module level cases,
adding a callback. This is similar to the way the per-function TTI
analysis works.
There was one place where we were looking for builtins but not in the
context of a specific function. See FindCXAAtExit in
lib/Transforms/IPO/GlobalOpt.cpp. I'm somewhat concerned my workaround
could provide the wrong behavior in some corner cases. Suggestions
welcome.
Reviewers: chandlerc, hfinkel
Subscribers: arsenm, dschuff, jvesely, nhaehnle, mehdi_amini, javed.absar, sbc100, jgravelle-google, eraman, aheejin, steven_wu, george.burgess.iv, dexonsmith, jfb, asbirlea, gchatelet, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66428
llvm-svn: 371284
2019-09-07 11:09:36 +08:00
|
|
|
; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}Module
|
2017-01-24 08:57:39 +08:00
|
|
|
; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis
|
2021-02-18 00:56:28 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: CallSiteSplittingPass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: TargetLibraryAnalysis on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: TargetIRAnalysis on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: DominatorTreeAnalysis on foo
|
|
|
|
; CHECK-O23SZ-NEXT: PGOIndirectCallPromotion
|
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: ProfileSummaryAnalysis
|
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: IPSCCPPass
|
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: AssumptionAnalysis on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: CalledValuePropagationPass
|
2017-07-28 01:45:02 +08:00
|
|
|
; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}SCC
|
2017-01-24 08:57:39 +08:00
|
|
|
; CHECK-O-NEXT: Running analysis: LazyCallGraphAnalysis
|
Change TargetLibraryInfo analysis passes to always require Function
Summary:
This is the first change to enable the TLI to be built per-function so
that -fno-builtin* handling can be migrated to use function attributes.
See discussion on D61634 for background. This is an enabler for fixing
handling of these options for LTO, for example.
This change should not affect behavior, as the provided function is not
yet used to build a specifically per-function TLI, but rather enables
that migration.
Most of the changes were very mechanical, e.g. passing a Function to the
legacy analysis pass's getTLI interface, or in Module level cases,
adding a callback. This is similar to the way the per-function TTI
analysis works.
There was one place where we were looking for builtins but not in the
context of a specific function. See FindCXAAtExit in
lib/Transforms/IPO/GlobalOpt.cpp. I'm somewhat concerned my workaround
could provide the wrong behavior in some corner cases. Suggestions
welcome.
Reviewers: chandlerc, hfinkel
Subscribers: arsenm, dschuff, jvesely, nhaehnle, mehdi_amini, javed.absar, sbc100, jgravelle-google, eraman, aheejin, steven_wu, george.burgess.iv, dexonsmith, jfb, asbirlea, gchatelet, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66428
llvm-svn: 371284
2019-09-07 11:09:36 +08:00
|
|
|
; CHECK-O1-NEXT: Running analysis: TargetLibraryAnalysis
|
2017-01-24 08:57:39 +08:00
|
|
|
; CHECK-O-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
|
2017-01-24 09:45:53 +08:00
|
|
|
; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph{{.*}}>
|
2020-07-29 08:08:24 +08:00
|
|
|
; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass
|
2017-01-24 08:57:39 +08:00
|
|
|
; CHECK-O-NEXT: Running analysis: AAManager
|
2021-01-21 08:53:03 +08:00
|
|
|
; CHECK-O-NEXT: Running analysis: BasicAA
|
|
|
|
; CHECK-O1-NEXT: Running analysis: AssumptionAnalysis on foo
|
2021-10-15 11:41:16 +08:00
|
|
|
; CHECK-O1-NEXT: Running analysis: TargetIRAnalysis
|
2021-01-21 08:53:03 +08:00
|
|
|
; CHECK-O1-NEXT: Running analysis: DominatorTreeAnalysis
|
|
|
|
; CHECK-O-NEXT: Running analysis: ScopedNoAliasAA
|
|
|
|
; CHECK-O-NEXT: Running analysis: TypeBasedAA
|
|
|
|
; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
|
2017-01-24 08:57:39 +08:00
|
|
|
; CHECK-O-NEXT: Running pass: ReversePostOrderFunctionAttrsPass
|
|
|
|
; CHECK-O-NEXT: Running analysis: CallGraphAnalysis
|
|
|
|
; CHECK-O-NEXT: Running pass: GlobalSplitPass
|
|
|
|
; CHECK-O-NEXT: Running pass: WholeProgramDevirtPass
|
2018-07-19 22:51:32 +08:00
|
|
|
; CHECK-O1-NEXT: Running pass: LowerTypeTestsPass
|
2021-02-18 00:56:28 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: GlobalOptPass
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: PromotePass
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: ConstantMergePass
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: DeadArgumentEliminationPass
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: InstCombinePass
|
2021-11-01 21:48:52 +08:00
|
|
|
; CHECK-O3-NEXT: Running pass: AggressiveInstCombinePass
|
[PM] Enable registration of out-of-tree passes with PassBuilder
Summary:
This patch adds a callback registration API to the PassBuilder,
enabling registering out-of-tree passes with it.
Through the Callback API, callers may register callbacks with the
various stages at which passes are added into pass managers, including
parsing of a pass pipeline as well as at extension points within the
default -O pipelines.
Registering utilities like `require<>` and `invalidate<>` needs to be
handled manually by the caller, but a helper is provided.
Additionally, adding passes at pipeline extension points is exposed
through the opt tool. This patch adds a `-passes-ep-X` commandline
option for every extension point X, which opt parses into pipelines
inserted into that extension point.
Reviewers: chandlerc
Reviewed By: chandlerc
Subscribers: lksbhm, grosser, davide, mehdi_amini, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D33464
llvm-svn: 307532
2017-07-10 18:57:55 +08:00
|
|
|
; CHECK-EP-Peephole-NEXT: Running pass: NoOpFunctionPass
|
2021-02-18 00:56:28 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: ModuleInlinerWrapperPass
|
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: InlineAdvisorAnalysis
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: InlinerPass
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: InlinerPass
|
2021-10-12 07:43:28 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Invalidating analysis: InlineAdvisorAnalysis
|
2021-02-18 00:56:28 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: GlobalOptPass
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: GlobalDCEPass
|
2021-08-28 18:25:58 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: ArgumentPromotionPass
|
2021-02-18 00:56:28 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: InstCombinePass
|
[PM] Enable registration of out-of-tree passes with PassBuilder
Summary:
This patch adds a callback registration API to the PassBuilder,
enabling registering out-of-tree passes with it.
Through the Callback API, callers may register callbacks with the
various stages at which passes are added into pass managers, including
parsing of a pass pipeline as well as at extension points within the
default -O pipelines.
Registering utilities like `require<>` and `invalidate<>` needs to be
handled manually by the caller, but a helper is provided.
Additionally, adding passes at pipeline extension points is exposed
through the opt tool. This patch adds a `-passes-ep-X` commandline
option for every extension point X, which opt parses into pipelines
inserted into that extension point.
Reviewers: chandlerc
Reviewed By: chandlerc
Subscribers: lksbhm, grosser, davide, mehdi_amini, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D33464
llvm-svn: 307532
2017-07-10 18:57:55 +08:00
|
|
|
; CHECK-EP-Peephole-NEXT: Running pass: NoOpFunctionPass
|
2021-02-18 00:56:28 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
|
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
|
2021-11-01 23:56:48 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: SROAPass on foo
|
2021-02-18 00:56:28 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: TailCallElimPass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: PostOrderFunctionAttrsPass on (foo)
|
2021-05-13 20:22:18 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA
|
2021-05-13 19:53:05 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: GlobalsAA on [module]
|
2021-05-14 09:12:55 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}AAManager
|
2021-05-13 19:53:05 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Invalidating analysis: AAManager on foo
|
2022-01-22 04:43:20 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: OpenMPOptCGSCCPass on (foo)
|
2021-02-18 00:56:28 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: LoopAnalysis on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: LCSSAPass on foo
|
2021-05-13 18:59:41 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: MemorySSAAnalysis on foo
|
2021-05-13 19:53:05 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: AAManager on foo
|
2021-02-18 00:56:28 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: ScalarEvolutionAnalysis on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: InnerAnalysisManagerProxy
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: LICMPass on Loop
|
2021-11-01 23:56:48 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: GVNPass on foo
|
2021-02-18 00:56:28 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: MemoryDependenceAnalysis on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: PhiValuesAnalysis on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: MemCpyOptPass on foo
|
2021-01-10 17:52:01 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: DSEPass on foo
|
2021-02-18 00:56:28 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: PostDominatorTreeAnalysis on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: MergedLoadStoreMotionPass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: LCSSAPass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: IndVarSimplifyPass on Loop
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: LoopDeletionPass on Loop
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: LoopFullUnrollPass on Loop
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: LoopDistributePass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: LoopVectorizePass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: BlockFrequencyAnalysis on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: BranchProbabilityAnalysis on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running analysis: DemandedBitsAnalysis on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: LoopUnrollPass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: WarnMissedTransformationsPass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: InstCombinePass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: SimplifyCFGPass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: SCCPPass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: InstCombinePass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: BDCEPass on foo
|
|
|
|
; CHECK-O2-NEXT: Running pass: SLPVectorizerPass on foo
|
|
|
|
; CHECK-O3-NEXT: Running pass: SLPVectorizerPass on foo
|
|
|
|
; CHECK-OS-NEXT: Running pass: SLPVectorizerPass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: VectorCombinePass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: AlignmentFromAssumptionsPass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: InstCombinePass on foo
|
|
|
|
; CHECK-EP-Peephole-NEXT: Running pass: NoOpFunctionPass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass on foo
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: LowerTypeTestsPass
|
Restore "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP"
This restores commit 80d0a137a5aba6998fadb764f1e11cb901aae233, and the
follow on fix in 873c0d0786dcf22f4af39f65df824917f70f2170, with a new
fix for test failures after a 2-stage clang bootstrap, and a more robust
fix for the Chromium build failure that an earlier version partially
fixed. See also discussion on D75201.
Reviewers: evgeny777
Subscribers: mehdi_amini, Prazek, hiraditya, steven_wu, dexonsmith, arphaman, davidxl, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D73242
2020-03-18 02:08:35 +08:00
|
|
|
; CHECK-O-NEXT: Running pass: LowerTypeTestsPass
|
2021-02-18 00:56:28 +08:00
|
|
|
; CHECK-O23SZ-NEXT: Running pass: SimplifyCFGPass
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: EliminateAvailableExternallyPass
|
|
|
|
; CHECK-O23SZ-NEXT: Running pass: GlobalDCEPass
|
2022-02-26 04:02:37 +08:00
|
|
|
; CHECK-EP-NEXT: Running pass: NoOpModulePass
|
2020-11-13 17:46:55 +08:00
|
|
|
; CHECK-O-NEXT: Running pass: AnnotationRemarksPass on foo
|
2017-01-24 08:57:39 +08:00
|
|
|
; CHECK-O-NEXT: Running pass: PrintModulePass
|
|
|
|
|
|
|
|
; Make sure we get the IR back out without changes when we print the module.
|
|
|
|
; CHECK-O-LABEL: define void @foo(i32 %n) local_unnamed_addr {
|
|
|
|
; CHECK-O-NEXT: entry:
|
|
|
|
; CHECK-O-NEXT: br label %loop
|
|
|
|
; CHECK-O: loop:
|
|
|
|
; CHECK-O-NEXT: %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
|
|
|
|
; CHECK-O-NEXT: %iv.next = add i32 %iv, 1
|
|
|
|
; CHECK-O-NEXT: tail call void @bar()
|
|
|
|
; CHECK-O-NEXT: %cmp = icmp eq i32 %iv, %n
|
|
|
|
; CHECK-O-NEXT: br i1 %cmp, label %exit, label %loop
|
|
|
|
; CHECK-O: exit:
|
|
|
|
; CHECK-O-NEXT: ret void
|
|
|
|
; CHECK-O-NEXT: }
|
|
|
|
;
|
|
|
|
|
|
|
|
declare void @bar() local_unnamed_addr
|
|
|
|
|
|
|
|
define void @foo(i32 %n) local_unnamed_addr {
|
|
|
|
entry:
|
|
|
|
br label %loop
|
|
|
|
loop:
|
|
|
|
%iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
|
|
|
|
%iv.next = add i32 %iv, 1
|
|
|
|
tail call void @bar()
|
|
|
|
%cmp = icmp eq i32 %iv, %n
|
|
|
|
br i1 %cmp, label %exit, label %loop
|
|
|
|
exit:
|
|
|
|
ret void
|
|
|
|
}
|