Index: docs/LoopTerminology.rst =================================================================== --- docs/LoopTerminology.rst +++ docs/LoopTerminology.rst @@ -14,7 +14,7 @@ First, let's start with the basics. In LLVM, a Loop is a cycle within 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. Note that there are some important implications of this definition: @@ -24,6 +24,11 @@ * Loops can contain non-loop cycles and non-loop cycles may contain loops. Loops may also contain sub-loops. +* A header block is uniquely associated with one loop. There can be + multiple cycles within that loop (e.g. sub-loops), but the *largest* + cycle must always be the union of all the cycles which contain the + header. + * Given the use of dominance in the definition, all loops are statically reachable from the entry of the function.