[PATCH] D65299: Try to clarify loop definition around confusing sub-loop case

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 14:56:43 PDT 2019


jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.

minor comments and corrections, LGTM otherwise. Thx.



================
Comment at: docs/LoopTerminology.rst:17
 the control flow graph (CFG) where there exists one block (the loop
-header block) which dominates all other blocks within the cycle.
+header block) which dominates all other blocks within that cycle.  
 
----------------
jdoerfert wrote:
> > a loop is a set of basic blocks (= nodes in the control flow graph (CFG)) that form a strongly connected component (SCC). In addition, each loop has a dedicated entry/header block that dominates all other blocks within the loop. Thus, without leaving the loop, one can reach every block in the loop from the header block and the header block from every block in the loop.
> 
> (It's not a single cycle.)
My bad, I missed the "maximal" part:
> In LLVM, a Loop is a maximal set of basic blocks that form a strongly connected component (SCC)


================
Comment at: docs/LoopTerminology.rst:32
+  multiple SCC within that loop, but strongly connected component
+  (SCC) formed from their union must always be unique.
+
----------------
Nit: "but the strongly connected component formed"


================
Comment at: docs/LoopTerminology.rst:63
+SCC which makes up the loop.)  That is, it has a successor which is
 an Exit Block.  
 
----------------
Nit: "(The latter is a consequence of the block being contained within an
SCC which is part of the loop.)"


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65299/new/

https://reviews.llvm.org/D65299





More information about the llvm-commits mailing list