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

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 19:21:41 PDT 2017


sanjoy added inline comments.


================
Comment at: include/llvm/Transforms/Scalar/LoopPassManager.h:169
     LAM.clear(L);
-    assert(CurrentL->contains(&L) && "Cannot delete a loop outside of the "
+    assert(&L == CurrentL ||
+           CurrentL->contains(&L) && "Cannot delete a loop outside of the "
----------------
chandlerc wrote:
> This seems like an unrelated change? (doesn't seem bad...)
`markLoopAsDeleted` is called after `L` has been cleared.  If `L` is the same as `CurrentL` then `CurrentL->contains(&L)` will assert.


https://reviews.llvm.org/D38055





More information about the llvm-commits mailing list