[PATCH] D45971: [LoopInfo] Verify BBMap tracks deepest loops for BBs.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 23 09:42:37 PDT 2018
fhahn created this revision.
fhahn added reviewers: chandlerc, mzolotukhin, sanjoy, mehdi_amini.
By checking that none of the child loops contain a BB we make sure BBMap
contains the deepest loop defining BB. This invariant was violated in
LoopInterchange and got caught by this assertion.
Repository:
rL LLVM
https://reviews.llvm.org/D45971
Files:
include/llvm/Analysis/LoopInfoImpl.h
Index: include/llvm/Analysis/LoopInfoImpl.h
===================================================================
--- include/llvm/Analysis/LoopInfoImpl.h
+++ include/llvm/Analysis/LoopInfoImpl.h
@@ -636,6 +636,9 @@
LoopT *L = Entry.second;
assert(Loops.count(L) && "orphaned loop");
assert(L->contains(BB) && "orphaned block");
+ for (LoopT *ChildLoop : *L)
+ assert(!ChildLoop->contains(BB) &&
+ "BBMap should point to the deepest loop containing BB");
}
// Recompute LoopInfo to verify loops structure.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45971.143580.patch
Type: text/x-patch
Size: 547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180423/1a4ef9e8/attachment.bin>
More information about the llvm-commits
mailing list