[PATCH] D63952: [LoopBase] Strengthen isLoopExiting by requiring that BB must be inside the loop.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 30 13:19:11 PDT 2019
fhahn updated this revision to Diff 207233.
fhahn added a comment.
Split off AMDGPU part to D63980 <https://reviews.llvm.org/D63980>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63952/new/
https://reviews.llvm.org/D63952
Files:
llvm/include/llvm/Analysis/LoopInfo.h
Index: llvm/include/llvm/Analysis/LoopInfo.h
===================================================================
--- llvm/include/llvm/Analysis/LoopInfo.h
+++ llvm/include/llvm/Analysis/LoopInfo.h
@@ -201,9 +201,10 @@
}
/// True if terminator in the block can branch to another block that is
- /// outside of the current loop.
+ /// outside of the current loop. \p BB must be inside the loop.
bool isLoopExiting(const BlockT *BB) const {
assert(!isInvalid() && "Loop not in a valid state!");
+ assert(contains(BB) && "Exiting block must be part of the loop");
for (const auto &Succ : children<const BlockT *>(BB)) {
if (!contains(Succ))
return true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63952.207233.patch
Type: text/x-patch
Size: 692 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190630/8fc6410d/attachment.bin>
More information about the llvm-commits
mailing list