[PATCH] D38055: Tighten the invariants around LoopBase::invalidate

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 14:26:09 PDT 2017


sanjoy created this revision.
Herald added subscribers: mcrosier, mehdi_amini.

With this change:

- Methods in LoopBase trip an assert if the receiver has been invalidated
- LoopBase::invalidate frees up the memory held the LoopBase instance

This change also shuffles things around as necessary to work with this stricter invariant.


https://reviews.llvm.org/D38055

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38055.115904.patch
Type: text/x-patch
Size: 26870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170919/4f99433c/attachment.bin>


More information about the llvm-commits mailing list