diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2017-09-20 02:31:57 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2017-09-20 02:31:57 +0000 |
commit | 09613b122e011731eb2917ac0106c0ea05e3f556 (patch) | |
tree | 70f4ff3f790cf5daaef6205262760a8346b371a3 /llvm/lib/Analysis/LoopPass.cpp | |
parent | b207d12456782bd04eb06ba8f3d89eb4008d81f6 (diff) | |
download | bcm5719-llvm-09613b122e011731eb2917ac0106c0ea05e3f556.tar.gz bcm5719-llvm-09613b122e011731eb2917ac0106c0ea05e3f556.zip |
Tighten the invariants around LoopBase::invalidate
Summary:
With this change:
- Methods in LoopBase trip an assert if the receiver has been invalidated
- LoopBase::clear frees up the memory held the LoopBase instance
This change also shuffles things around as necessary to work with this stricter invariant.
Reviewers: chandlerc
Subscribers: mehdi_amini, mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D38055
llvm-svn: 313708
Diffstat (limited to 'llvm/lib/Analysis/LoopPass.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopPass.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp index e988f6444a5..6496c6039e4 100644 --- a/llvm/lib/Analysis/LoopPass.cpp +++ b/llvm/lib/Analysis/LoopPass.cpp @@ -198,9 +198,7 @@ bool LPPassManager::runOnFunction(Function &F) { LoopWasDeleted = CurrentLoop->isInvalid(); if (Changed) - dumpPassInfo(P, MODIFICATION_MSG, ON_LOOP_MSG, - LoopWasDeleted ? "<deleted>" - : CurrentLoop->getHeader()->getName()); + dumpPassInfo(P, MODIFICATION_MSG, ON_LOOP_MSG, CurrentLoop->getName()); dumpPreservedSet(P); if (LoopWasDeleted) { |