#
c71869ed |
| 02-Sep-2021 |
Markus Lavin <markus.lavin@ericsson.com> |
[NPM] Added opt option -print-pipeline-passes.
Added opt option -print-pipeline-passes to print a -passes compatible string describing the built pass pipeline.
As an example: $ opt -enable-new-pm=1
[NPM] Added opt option -print-pipeline-passes.
Added opt option -print-pipeline-passes to print a -passes compatible string describing the built pass pipeline.
As an example: $ opt -enable-new-pm=1 -adce -licm -simplifycfg -o /dev/null /dev/null -print-pipeline-passes verify,function(adce),function(loop-mssa(licm)),function(simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts>),verify,BitcodeWriterPass
At the moment this is best-effort only and there are some known limitations: - Not all passes accepting parameters will print their parameters (currently only implemented for simplifycfg). - Some ClassName to pass-name mappings are not unique. - Some ClassName to pass-name mappings are missing (e.g. BitcodeWriterPass).
show more ...
|
Revision tags: llvmorg-13.0.0-rc2 |
|
#
0afd10b4 |
| 19-Aug-2021 |
Nikita Popov <nikita.ppv@gmail.com> |
[LoopPassManager] Assert that MemorySSA is preserved if used
Currently it's possible to silently use a loop pass that does not preserve MemorySSA in a loop-mssa pass manager, as we don't statically
[LoopPassManager] Assert that MemorySSA is preserved if used
Currently it's possible to silently use a loop pass that does not preserve MemorySSA in a loop-mssa pass manager, as we don't statically know which loop passes preserve MemorySSA (as was the case with the legacy pass manager).
However, we can at least add a check after the fact that if MemorySSA is used, then it should also have been preserved. Hopefully this will reduce confusion as seen in https://bugs.llvm.org/show_bug.cgi?id=51020.
Differential Revision: https://reviews.llvm.org/D108399
show more ...
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
#
6b9524a0 |
| 06-May-2021 |
Arthur Eubanks <aeubanks@google.com> |
[NewPM] Don't mark AA analyses as preserved
Currently all AA analyses marked as preserved are stateless, not taking into account their dependent analyses. So there's no need to mark them as preserve
[NewPM] Don't mark AA analyses as preserved
Currently all AA analyses marked as preserved are stateless, not taking into account their dependent analyses. So there's no need to mark them as preserved, they won't be invalidated unless their analyses are.
SCEVAAResults was the one exception to this, it was treated like a typical analysis result. Make it like the others and don't invalidate unless SCEV is invalidated.
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D102032
show more ...
|
#
34a8a437 |
| 03-May-2021 |
Arthur Eubanks <aeubanks@google.com> |
[NewPM] Hide pass manager debug logging behind -debug-pass-manager-verbose
Printing pass manager invocations is fairly verbose and not super useful.
This allows us to remove DebugLogging from pass
[NewPM] Hide pass manager debug logging behind -debug-pass-manager-verbose
Printing pass manager invocations is fairly verbose and not super useful.
This allows us to remove DebugLogging from pass managers and PassBuilder since all logging (aside from analysis managers) goes through instrumentation now.
This has the downside of never being able to print the top level pass manager via instrumentation, but that seems like a minor downside.
Reviewed By: ychen
Differential Revision: https://reviews.llvm.org/D101797
show more ...
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4 |
|
#
a17394dc |
| 19-Mar-2021 |
Arthur Eubanks <aeubanks@google.com> |
[NewPM] Verify LoopAnalysisResults after a loop pass
All loop passes should preserve all analyses in LoopAnalysisResults. Add checks for those when the checks are enabled (which is by default with e
[NewPM] Verify LoopAnalysisResults after a loop pass
All loop passes should preserve all analyses in LoopAnalysisResults. Add checks for those when the checks are enabled (which is by default with expensive checks on).
Note that due to PR44815, we don't check LAR's ScalarEvolution. Apparently calling SE.verify() can change its results.
This is a reland of https://reviews.llvm.org/D98820 which was reverted due to unacceptably large compile time regressions in normal debug builds.
show more ...
|
#
a1ab5627 |
| 19-Mar-2021 |
Arthur Eubanks <aeubanks@google.com> |
Revert "[NewPM] Verify LoopAnalysisResults after a loop pass"
This reverts commit 94c269baf58330a5e303a4f86f64681f2f7a858b.
Still causes too large of compile time regression in normal debug builds.
Revert "[NewPM] Verify LoopAnalysisResults after a loop pass"
This reverts commit 94c269baf58330a5e303a4f86f64681f2f7a858b.
Still causes too large of compile time regression in normal debug builds. Will put under expensive checks instead.
show more ...
|
#
94c269ba |
| 17-Mar-2021 |
Arthur Eubanks <aeubanks@google.com> |
[NewPM] Verify LoopAnalysisResults after a loop pass
All loop passes should preserve all analyses in LoopAnalysisResults. Add checks for those.
Note that due to PR44815, we don't check
[NewPM] Verify LoopAnalysisResults after a loop pass
All loop passes should preserve all analyses in LoopAnalysisResults. Add checks for those.
Note that due to PR44815, we don't check LAR's ScalarEvolution. Apparently calling SE.verify() can change its results.
Only verify MSSA when VerifyMemorySSA, normally it's very expensive.
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D98820
show more ...
|
#
792bed6a |
| 17-Mar-2021 |
Arthur Eubanks <aeubanks@google.com> |
Revert "[NewPM] Verify LoopAnalysisResults after a loop pass"
This reverts commit 6db3ab2903f42712f44000afb5aa467efbd25f35.
Causing too large of compile time regression.
|
#
6db3ab29 |
| 17-Mar-2021 |
Arthur Eubanks <aeubanks@google.com> |
[NewPM] Verify LoopAnalysisResults after a loop pass
All loop passes should preserve all analyses in LoopAnalysisResults. Add checks for those.
Note that due to PR44815, we don't check LAR's Scalar
[NewPM] Verify LoopAnalysisResults after a loop pass
All loop passes should preserve all analyses in LoopAnalysisResults. Add checks for those.
Note that due to PR44815, we don't check LAR's ScalarEvolution. Apparently calling SE.verify() can change its results.
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D98805
show more ...
|
Revision tags: llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2 |
|
#
f70cdc5b |
| 18-Feb-2021 |
Ta-Wei Tu <tu.da.wei@gmail.com> |
[NPM] Properly reset parent loop after loop passes
This fixes https://bugs.llvm.org/show_bug.cgi?id=49185
When `NDEBUG` is not set, `LPMUpdater` checks if the added loops have the same parent loop
[NPM] Properly reset parent loop after loop passes
This fixes https://bugs.llvm.org/show_bug.cgi?id=49185
When `NDEBUG` is not set, `LPMUpdater` checks if the added loops have the same parent loop as the current one in `addSiblingLoops`. If multiple loop passes are executed through `LoopPassManager`, `U.ParentL` will be the same across all passes. However, the parent loop might change after running a loop pass, resulting in assertion failures in subsequent passes.
This patch resets `U.ParentL` after running individual loop passes in `LoopPassManager`.
Reviewed By: asbirlea, ychen
Differential Revision: https://reviews.llvm.org/D96727
show more ...
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1 |
|
#
d7a6f3a1 |
| 22-Dec-2020 |
Ta-Wei Tu <tu.da.wei@gmail.com> |
[LoopNest] Extend `LPMUpdater` and adaptor to handle loop-nest passes
This is a follow-up patch of D87045.
The patch implements "loop-nest mode" for `LPMUpdater` and `FunctionToLoopPassAdaptor` in
[LoopNest] Extend `LPMUpdater` and adaptor to handle loop-nest passes
This is a follow-up patch of D87045.
The patch implements "loop-nest mode" for `LPMUpdater` and `FunctionToLoopPassAdaptor` in which only top-level loops are operated.
`createFunctionToLoopPassAdaptor` decides whether the returned adaptor is in loop-nest mode or not based on the given pass. If the pass is a loop-nest pass or the pass is a `LoopPassManager` which contains only loop-nest passes, the loop-nest version of adaptor is returned; otherwise, the normal (loop) version of adaptor is returned.
Reviewed By: Whitney
Differential Revision: https://reviews.llvm.org/D87531
show more ...
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
#
9ed8e0ca |
| 09-Dec-2020 |
dfukalov <daniil.fukalov@amd.com> |
[NFC] Reduce include files dependency and AA header cleanup (part 2).
Continuing work started in https://reviews.llvm.org/D92489:
Removed a bunch of includes from "AliasAnalysis.h" and "LoopPassMan
[NFC] Reduce include files dependency and AA header cleanup (part 2).
Continuing work started in https://reviews.llvm.org/D92489:
Removed a bunch of includes from "AliasAnalysis.h" and "LoopPassManager.h".
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D92852
show more ...
|
#
fa3693ad |
| 16-Dec-2020 |
Whitney Tsang <whitneyt@ca.ibm.com> |
[LoopNest] Handle loop-nest passes in LoopPassManager
Per http://llvm.org/OpenProjects.html#llvm_loopnest, the goal of this patch (and other following patches) is to create facilities that allow imp
[LoopNest] Handle loop-nest passes in LoopPassManager
Per http://llvm.org/OpenProjects.html#llvm_loopnest, the goal of this patch (and other following patches) is to create facilities that allow implementing loop nest passes that run on top-level loop nests for the New Pass Manager.
This patch extends the functionality of LoopPassManager to handle loop-nest passes by specializing the definition of LoopPassManager that accepts both kinds of passes in addPass.
Only loop passes are executed if L is not a top-level one, and both kinds of passes are executed if L is top-level. Currently, loop nest passes should have the following run method:
PreservedAnalyses run(LoopNest &, LoopAnalysisManager &, LoopStandardAnalysisResults &, LPMUpdater &);
Reviewed By: Whitney, ychen Differential Revision: https://reviews.llvm.org/D87045
show more ...
|
#
7f6f9f4c |
| 04-Dec-2020 |
Arthur Eubanks <aeubanks@google.com> |
[NewPM] Make pass adaptors less templatey
Currently PassBuilder.cpp is by far the file that takes longest to compile. This is due to tons of templates being instantiated per pass.
Follow PassManage
[NewPM] Make pass adaptors less templatey
Currently PassBuilder.cpp is by far the file that takes longest to compile. This is due to tons of templates being instantiated per pass.
Follow PassManager by using wrappers around passes to avoid making the adaptors templated on the pass type. This allows us to move various adaptors' run methods into .cpp files.
This reduces the compile time of PassBuilder.cpp on my machine from 66 to 39 seconds. It also reduces the size of opt from 685M to 676M.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D92616
show more ...
|
Revision tags: llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3 |
|
#
18bc400f |
| 21-Aug-2020 |
Yevgeny Rouban <yrouban@azul.com> |
[NewPM][PassInstrumentation] Add PreservedAnalyses parameter to AfterPass* callbacks
Both AfterPass and AfterPassInvalidated pass instrumentation callbacks get additional parameter of type Preserved
[NewPM][PassInstrumentation] Add PreservedAnalyses parameter to AfterPass* callbacks
Both AfterPass and AfterPassInvalidated pass instrumentation callbacks get additional parameter of type PreservedAnalyses. This patch was created by @fedor.sergeev. I have just slightly changed it.
Reviewers: fedor.sergeev
Differential Revision: https://reviews.llvm.org/D81555
show more ...
|
Revision tags: llvmorg-11.0.0-rc2 |
|
#
954bd9c8 |
| 07-Aug-2020 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[NewPM] Only verify loop for nonskipped user loop pass
No verification for pass mangers since it is not needed. No verification for skipped loop pass since the asserted condition is not used.
Add a
[NewPM] Only verify loop for nonskipped user loop pass
No verification for pass mangers since it is not needed. No verification for skipped loop pass since the asserted condition is not used.
Add a BeforeNonSkippedPass callback for this. The callback needs more inputs than its parameters to work so the callback is added on-the-fly.
Reviewed By: aeubanks, asbirlea
Differential Revision: https://reviews.llvm.org/D84977
show more ...
|
#
555cf42f |
| 29-Jul-2020 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[NewPM][PassInstrument] Add PrintPass callback to StandardInstrumentations
Problem: Right now, our "Running pass" is not accurate when passes are wrapped in adaptor because adaptor is never skipped
[NewPM][PassInstrument] Add PrintPass callback to StandardInstrumentations
Problem: Right now, our "Running pass" is not accurate when passes are wrapped in adaptor because adaptor is never skipped and a pass could be skipped. The other problem is that "Running pass" for a adaptor is before any "Running pass" of passes/analyses it depends on. (for example, FunctionToLoopPassAdaptor). So the order of printing is not the actual order.
Solution: Doing things like PassManager::Debuglogging is very intrusive because we need to specify Debuglogging whenever adaptor is created. (Actually, right now we're not specifying Debuglogging for some sub-PassManagers. Check PassBuilder)
This patch move debug logging for pass as a PassInstrument callback. We could be sure that all running passes are logged and in the correct order.
This could also be used to implement hierarchy pass logging in legacy PM. We could also move logging of pass manager to this if we want.
The test fixes looks messy. It includes changes: - Remove PassInstrumentationAnalysis - Remove PassAdaptor - If a PassAdaptor is for a real pass, the pass is added - Pass reorder (to the correct order), related to PassAdaptor - Add missing passes (due to Debuglogging not passed down)
Reviewed By: asbirlea, aeubanks
Differential Revision: https://reviews.llvm.org/D84774
show more ...
|
Revision tags: llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
#
c4b1daed |
| 25-Jun-2020 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[NewPM] Move debugging log printing after PassInstrumentation before-pass-callbacks
For passes got skipped, this is confusing because the log said it is `running pass` but it is skipped later.
Revi
[NewPM] Move debugging log printing after PassInstrumentation before-pass-callbacks
For passes got skipped, this is confusing because the log said it is `running pass` but it is skipped later.
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D82511
show more ...
|
Revision tags: llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4 |
|
#
c5a06019 |
| 06-Mar-2020 |
Andrew Monshizadeh <amonshiz@gmail.com> |
Extend TimeTrace to LLVM's new pass manager
With the addition of the LLD time tracing it made sense to include coverage for LLVM's various passes. Doing so ensures that ThinLTO is also covered with
Extend TimeTrace to LLVM's new pass manager
With the addition of the LLD time tracing it made sense to include coverage for LLVM's various passes. Doing so ensures that ThinLTO is also covered with a time trace.
Before: {F11333974}
After: {F11333928}
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D74516
show more ...
|
Revision tags: llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
#
a1d95c3f |
| 11-Dec-2018 |
Fedor Sergeev <fedor.sergeev@azul.com> |
[NewPM] fixing asserts on deleted loop in -print-after-all
IR-printing AfterPass instrumentation might be called on a loop that has just been invalidated. We should skip printing it to avoid spuriou
[NewPM] fixing asserts on deleted loop in -print-after-all
IR-printing AfterPass instrumentation might be called on a loop that has just been invalidated. We should skip printing it to avoid spurious asserts.
Reviewed By: chandlerc, philip.pfaffe Differential Revision: https://reviews.llvm.org/D54740
llvm-svn: 348887
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1 |
|
#
ee8d31c4 |
| 20-Sep-2018 |
Fedor Sergeev <fedor.sergeev@azul.com> |
[New PM] Introducing PassInstrumentation framework
Pass Execution Instrumentation interface enables customizable instrumentation of pass execution, as per "RFC: Pass Execution Instrumentation interf
[New PM] Introducing PassInstrumentation framework
Pass Execution Instrumentation interface enables customizable instrumentation of pass execution, as per "RFC: Pass Execution Instrumentation interface" posted 06/07/2018 on llvm-dev@
The intent is to provide a common machinery to implement all the pass-execution-debugging features like print-before/after, opt-bisect, time-passes etc.
Here we get a basic implementation consisting of: * PassInstrumentationCallbacks class that handles registration of callbacks and access to them.
* PassInstrumentation class that handles instrumentation-point interfaces that call into PassInstrumentationCallbacks.
* Callbacks accept StringRef which is just a name of the Pass right now. There were some ideas to pass an opaque wrapper for the pointer to pass instance, however it appears that pointer does not actually identify the instance (adaptors and managers might have the same address with the pass they govern). Hence it was decided to go simple for now and then later decide on what the proper mental model of identifying a "pass in a phase of pipeline" is.
* Callbacks accept llvm::Any serving as a wrapper for const IRUnit*, to remove direct dependencies on different IRUnits (e.g. Analyses).
* PassInstrumentationAnalysis analysis is explicitly requested from PassManager through usual AnalysisManager::getResult. All pass managers were updated to run that to get PassInstrumentation object for instrumentation calls.
* Using tuples/index_sequence getAnalysisResult helper to extract generic AnalysisManager's extra args out of a generic PassManager's extra args. This is the only way I was able to explicitly run getResult for PassInstrumentationAnalysis out of a generic code like PassManager::run or RepeatedPass::run. TODO: Upon lengthy discussions we agreed to accept this as an initial implementation and then get rid of getAnalysisResult by improving RepeatedPass implementation.
* PassBuilder takes PassInstrumentationCallbacks object to pass it further into PassInstrumentationAnalysis. Callbacks registration should be performed directly through PassInstrumentationCallbacks.
* new-pm tests updated to account for PassInstrumentationAnalysis being run
* Added PassInstrumentation tests to PassBuilderCallbacks unit tests. Other unit tests updated with registration of the now-required PassInstrumentationAnalysis.
Made getName helper to return std::string (instead of StringRef initially) to fix asan builtbot failures on CGSCC tests.
Reviewers: chandlerc, philip.pfaffe Differential Revision: https://reviews.llvm.org/D47858
llvm-svn: 342664
show more ...
|
#
01988937 |
| 20-Sep-2018 |
Eric Christopher <echristo@gmail.com> |
Temporarily Revert "[New PM] Introducing PassInstrumentation framework" as it was causing failures in the asan buildbot.
This reverts commit r342597.
llvm-svn: 342616
|
#
a5f279ea |
| 19-Sep-2018 |
Fedor Sergeev <fedor.sergeev@azul.com> |
[New PM] Introducing PassInstrumentation framework
Pass Execution Instrumentation interface enables customizable instrumentation of pass execution, as per "RFC: Pass Execution Instrumentation interf
[New PM] Introducing PassInstrumentation framework
Pass Execution Instrumentation interface enables customizable instrumentation of pass execution, as per "RFC: Pass Execution Instrumentation interface" posted 06/07/2018 on llvm-dev@
The intent is to provide a common machinery to implement all the pass-execution-debugging features like print-before/after, opt-bisect, time-passes etc.
Here we get a basic implementation consisting of: * PassInstrumentationCallbacks class that handles registration of callbacks and access to them.
* PassInstrumentation class that handles instrumentation-point interfaces that call into PassInstrumentationCallbacks.
* Callbacks accept StringRef which is just a name of the Pass right now. There were some ideas to pass an opaque wrapper for the pointer to pass instance, however it appears that pointer does not actually identify the instance (adaptors and managers might have the same address with the pass they govern). Hence it was decided to go simple for now and then later decide on what the proper mental model of identifying a "pass in a phase of pipeline" is.
* Callbacks accept llvm::Any serving as a wrapper for const IRUnit*, to remove direct dependencies on different IRUnits (e.g. Analyses).
* PassInstrumentationAnalysis analysis is explicitly requested from PassManager through usual AnalysisManager::getResult. All pass managers were updated to run that to get PassInstrumentation object for instrumentation calls.
* Using tuples/index_sequence getAnalysisResult helper to extract generic AnalysisManager's extra args out of a generic PassManager's extra args. This is the only way I was able to explicitly run getResult for PassInstrumentationAnalysis out of a generic code like PassManager::run or RepeatedPass::run. TODO: Upon lengthy discussions we agreed to accept this as an initial implementation and then get rid of getAnalysisResult by improving RepeatedPass implementation.
* PassBuilder takes PassInstrumentationCallbacks object to pass it further into PassInstrumentationAnalysis. Callbacks registration should be performed directly through PassInstrumentationCallbacks.
* new-pm tests updated to account for PassInstrumentationAnalysis being run
* Added PassInstrumentation tests to PassBuilderCallbacks unit tests. Other unit tests updated with registration of the now-required PassInstrumentationAnalysis.
Reviewers: chandlerc, philip.pfaffe Differential Revision: https://reviews.llvm.org/D47858
llvm-svn: 342597
show more ...
|
#
25de3f83 |
| 19-Sep-2018 |
Fedor Sergeev <fedor.sergeev@azul.com> |
Revert rL342544: [New PM] Introducing PassInstrumentation framework
A bunch of bots fail to compile unittests. Reverting.
llvm-svn: 342552
|