summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Dominators] Remove verifyDomTree and add some verifying for Post Dom TreesDavid Green2018-02-281-6/+6
| | | | | | | | | | | | 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
* Need to work around the gcc Wunused-function bug as far back as gcc 6.1, ↵Eric Christopher2017-11-161-3/+3
| | | | | | update accordingly. llvm-svn: 318372
* Use a BumpPtrAllocator for Loop objectsSanjoy Das2017-09-281-7/+8
| | | | | | | | | | | | | | | 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
* Rename markAsErased to erase, as pointed out in a previous review; NFCSanjoy Das2017-09-221-1/+1
| | | | llvm-svn: 313951
* [LoopInfo] Make LoopBase and Loop destructors non-publicSanjoy Das2017-09-191-23/+17
| | | | | | | | | | | | | | | | | | | 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
* Supressed warning: declared ‘static’ but never defined.Galina Kistanova2017-06-141-0/+11
| | | | llvm-svn: 305403
* Re-sort #include lines for unittests. This uses a slightly modifiedChandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | 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
* [PM] Defend against getting slightly wrong template arguments passedChandler Carruth2017-02-071-2/+8
| | | | | | | | | | | | | | | | | | | | 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
* [PM] Teach the loop PM to run LoopSimplify prior to the loop pipeline.Chandler Carruth2017-01-211-107/+258
| | | | | | | | | | | | | | | 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
* [PM] The assumption cache is fundamentally designed to be self-updating,Chandler Carruth2017-01-151-23/+1
| | | | | | | | | | | | | | 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
* Fix unused variable warningSimon Pilgrim2017-01-111-1/+1
| | | | llvm-svn: 291666
* [PM] Separate the LoopAnalysisManager from the LoopPassManager and moveChandler Carruth2017-01-111-0/+1438
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
OpenPOWER on IntegriCloud