[PATCH] D74890: [Analysis] getParentLoop() documentation
Stefanos Baziotis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 20 02:59:57 PST 2020
baziotis created this revision.
baziotis added reviewers: lebedev.ri, jdoerfert, nlopes, efriedma.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
baziotis edited the summary of this revision.
Recently I had to use it and although one assumes it returns null if there's no parent loop, I think it helps to doc it.
Edit: Also, I don't how to add it in Doxygen (or if it is added automatically).
Note: Again, I don't know how to add the correct reviewers
https://reviews.llvm.org/D74890
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
@@ -103,6 +103,9 @@
return D;
}
BlockT *getHeader() const { return getBlocks().front(); }
+ // Return the parent loop of this loop (i.e. the loop in which
+ // this loop is entirely contained). If there's no such loop (i.e.
+ // this is a top level loop in the function), return null.
LoopT *getParentLoop() const { return ParentLoop; }
/// This is a raw interface for bypassing addChildLoop.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74890.245609.patch
Type: text/x-patch
Size: 612 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200220/6ca12c76/attachment.bin>
More information about the llvm-commits
mailing list