#
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
|
#
875c938f |
| 19-Sep-2018 |
Fedor Sergeev <fedor.sergeev@azul.com> |
[New PM] Introducing PassInstrumentation framework
Summary: Pass Execution Instrumentation interface enables customizable instrumentation of pass execution, as per "RFC: Pass Execution Instrumentati
[New PM] Introducing PassInstrumentation framework
Summary: 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: 342544
show more ...
|
Revision tags: llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0 |
|
#
7c35de12 |
| 28-Feb-2018 |
David Green <david.green@arm.com> |
[Dominators] Remove verifyDomTree and add some verifying for Post Dom Trees
Removes verifyDomTree, using assert(verify()) everywhere instead, and changes verify a little to always run IsSameAsFreshT
[Dominators] Remove verifyDomTree and add some verifying for Post Dom Trees
Removes verifyDomTree, using assert(verify()) everywhere instead, and changes verify a little to always run IsSameAsFreshTree first in order to print good output when we find errors. Also adds verifyAnalysis for PostDomTrees, which will allow checking of PostDomTrees it the same way we check DomTrees and MachineDomTrees.
Differential Revision: https://reviews.llvm.org/D41298
llvm-svn: 326315
show more ...
|
Revision tags: llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2 |
|
#
7f04e87a |
| 16-Nov-2017 |
Eric Christopher <echristo@gmail.com> |
Need to work around the gcc Wunused-function bug as far back as gcc 6.1, update accordingly.
llvm-svn: 318372
|
Revision tags: llvmorg-5.0.1-rc1 |
|
#
def1729d |
| 28-Sep-2017 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
Use a BumpPtrAllocator for Loop objects
Summary: And now that we no longer have to explicitly free() the Loop instances, we can (with more ease) use the destructor of LoopBase to do what LoopBase::c
Use a BumpPtrAllocator for Loop objects
Summary: And now that we no longer have to explicitly free() the Loop instances, we can (with more ease) use the destructor of LoopBase to do what LoopBase::clear() was doing.
Reviewers: chandlerc
Subscribers: mehdi_amini, mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D38201
llvm-svn: 314375
show more ...
|
#
388b012f |
| 22-Sep-2017 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
Rename markAsErased to erase, as pointed out in a previous review; NFC
llvm-svn: 313951
|
#
76ab2323 |
| 19-Sep-2017 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
[LoopInfo] Make LoopBase and Loop destructors non-public
Summary: See comment for why I think this is a good idea.
This change also:
- Removes an SCEV test case. The SCEV test was not testing an
[LoopInfo] Make LoopBase and Loop destructors non-public
Summary: See comment for why I think this is a good idea.
This change also:
- Removes an SCEV test case. The SCEV test was not testing anything useful (most of it was `#if 0` ed out) and it would need to be updated to deal with a private ~Loop::Loop. - Updates the loop pass manager test case to deal with a private ~Loop::Loop. - Renames markAsRemoved to markAsErased to contrast with removeLoop, via the usual remove vs. erase idiom we already have for instructions and basic blocks.
Reviewers: chandlerc
Subscribers: mehdi_amini, mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D37996
llvm-svn: 313695
show more ...
|
Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1 |
|
#
465c2c26 |
| 14-Jun-2017 |
Galina Kistanova <gkistanova@gmail.com> |
Supressed warning: declared ‘static’ but never defined.
llvm-svn: 305403
|
Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3 |
|
#
9a67b073 |
| 06-Jun-2017 |
Chandler Carruth <chandlerc@gmail.com> |
Re-sort #include lines for unittests. This uses a slightly modified clang-format (https://reviews.llvm.org/D33932) to keep primary headers at the top and handle new utility headers like 'gmock' consi
Re-sort #include lines for unittests. This uses a slightly modified clang-format (https://reviews.llvm.org/D33932) to keep primary headers at the top and handle new utility headers like 'gmock' consistently with other utility headers.
No other change was made. I did no manual edits, all of this is clang-format.
This should allow other changes to have more clear and focused diffs, and is especially motivated by moving some headers into more focused libraries.
llvm-svn: 304786
show more ...
|
Revision tags: llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2 |
|
#
84f24707 |
| 07-Feb-2017 |
Chandler Carruth <chandlerc@gmail.com> |
[PM] Defend against getting slightly wrong template arguments passed into CRTP base classes.
This can sometimes happen and not cause an immediate failure when the derived class is, itself, a templat
[PM] Defend against getting slightly wrong template arguments passed into CRTP base classes.
This can sometimes happen and not cause an immediate failure when the derived class is, itself, a template. You can end up essentially calling methods on the wrong derived type but a type where many things will appear to "work".
To fail fast and with a clear error message we can use a static_assert, but we have to stash that static_assert inside a method body or nested type that won't need to be completed while building the base class. I've tried to pick a reasonably small number of places that seemed like they would definitely get triggered on use.
This is the last of the patch series defending against this that I have planned, so far no bugs other than the original were found.
llvm-svn: 294275
show more ...
|
#
17350de1 |
| 21-Jan-2017 |
Chandler Carruth <chandlerc@gmail.com> |
[PM] Teach the loop PM to run LoopSimplify prior to the loop pipeline.
This adds the last remaining core feature of the loop pass pipeline in the new PM and removes the last of the really egregious
[PM] Teach the loop PM to run LoopSimplify prior to the loop pipeline.
This adds the last remaining core feature of the loop pass pipeline in the new PM and removes the last of the really egregious hacks in the LICM tests.
Sadly, this requires really substantial changes in the unittests in order to provide and maintain simplified loops. This is particularly hard because for example LoopSimplify will try to fold undef branches to an ideal direction and simplify the loop accordingly.
Differential Revision: https://reviews.llvm.org/D28766
llvm-svn: 292709
show more ...
|
Revision tags: llvmorg-4.0.0-rc1 |
|
#
2f19a324 |
| 15-Jan-2017 |
Chandler Carruth <chandlerc@gmail.com> |
[PM] The assumption cache is fundamentally designed to be self-updating, mark it as never invalidated in the new PM.
The old PM already required this to work, and after a discussion with Hal this se
[PM] The assumption cache is fundamentally designed to be self-updating, mark it as never invalidated in the new PM.
The old PM already required this to work, and after a discussion with Hal this seems to really be the only sensible answer. The cache gracefully degrades as the IR is mutated, and most things which do this should already be incrementally updating the cache.
This gets rid of a bunch of logic preserving and testing the invalidation of this analysis.
llvm-svn: 292039
show more ...
|
#
2ded2529 |
| 11-Jan-2017 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
Fix unused variable warning
llvm-svn: 291666
|
#
3bab7e1a |
| 11-Jan-2017 |
Chandler Carruth <chandlerc@gmail.com> |
[PM] Separate the LoopAnalysisManager from the LoopPassManager and move the latter to the Transforms library.
While the loop PM uses an analysis to form the IR units, the current plan is to have the
[PM] Separate the LoopAnalysisManager from the LoopPassManager and move the latter to the Transforms library.
While the loop PM uses an analysis to form the IR units, the current plan is to have the PM itself establish and enforce both loop simplified form and LCSSA. This would be a layering violation in the analysis library.
Fundamentally, the idea behind the loop PM is to *transform* loops in addition to running passes over them, so it really seemed like the most natural place to sink this was into the transforms library.
We can't just move *everything* because we also have loop analyses that rely on a subset of the invariants. So this patch splits the the loop infrastructure into the analysis management that has to be part of the analysis library, and the transform-aware pass manager.
This also required splitting the loop analyses' printer passes out to the transforms library, which makes sense to me as running these will transform the code into LCSSA in theory.
I haven't split the unittest though because testing one component without the other seems nearly intractable.
Differential Revision: https://reviews.llvm.org/D28452
llvm-svn: 291662
show more ...
|