OSDN Git Service

Tighten the invariants around LoopBase::invalidate
authorSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 20 Sep 2017 02:31:57 +0000 (02:31 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 20 Sep 2017 02:31:57 +0000 (02:31 +0000)
commit198959c487f744f9a4649640c0dfab318ba154fd
tree12be9bb95b2339071eff670b2525f73060784b81
parent097fb8c42258d769e754971db833d539ac46542b
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313708 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/LoopInfo.h
include/llvm/Analysis/LoopInfoImpl.h
include/llvm/Transforms/Scalar/LoopPassManager.h
include/llvm/Transforms/Utils/UnrollLoop.h
lib/Analysis/LoopInfo.cpp
lib/Analysis/LoopPass.cpp
lib/Transforms/Scalar/LoopUnrollPass.cpp
lib/Transforms/Utils/LoopUnroll.cpp
test/Transforms/LoopUnroll/unroll-loop-invalidation.ll