Skip to content

Commit 9044949

Browse files
committed
Apply a few more reviewer suggestions from D65164
llvm-svn: 366961
1 parent 58b4787 commit 9044949

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

llvm/docs/LoopTerminology.rst

+11-6
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,23 @@ Preheader Block - A preheader is a (singular) loop predecessor which
8080
ends in an unconditional transfer of control to the loop header. Note
8181
that not all loops have such blocks.
8282

83-
Backedge Taken Count - The number of times the backedge will have
84-
executed before some interesting event happens. Commonly used without
83+
Backedge Taken Count - The number of times the backedge will execute
84+
before some interesting event happens. Commonly used without
8585
qualification of the event as a shorthand for when some exiting block
8686
branches to some exit block. May be zero, or not statically computable.
8787

88-
Iteration Count - The number of times the header has executed before
89-
some interesting event happens. Commonly used w/o qualification to
88+
Iteration Count - The number of times the header will execute before
89+
some interesting event happens. Commonly used without qualification to
9090
refer to the iteration count at which the loop exits. Will always be
91-
one greater than the backedge taken count. (Warning: Preceding
91+
one greater than the backedge taken count. *Warning*: Preceding
9292
statement is true in the *integer domain*; if you're dealing with fixed
9393
width integers (such as LLVM Values or SCEVs), you need to be cautious
94-
of overflow when converting one to the other.)
94+
of overflow when converting one to the other.
95+
96+
It's important to note that the same basic block can play multiple
97+
roles in the same loop, or in different loops at once. For example, a
98+
single block can be the header for two nested loops at once, while
99+
also being an exit block for a sibling loop.
95100

96101
Loop Simplify Form
97102
==================

0 commit comments

Comments
 (0)