aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-05-19 01:52:46 +0000
committerDan Gohman <gohman@apple.com>2009-05-19 01:52:46 +0000
commit6c3534c5aa6b1d34b277dfaca3af86ac41e53f0e (patch)
treed1ce6b7fde7f0b1d974736565768fed340bc7e84
parent84e5cac70ae394d708614016db20eb0cfbe82ec2 (diff)
Add some comments noting how IndVarSimplify facilitates
LoopInfo functionality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72091 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/LoopInfo.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h
index 69773a66ec..fb0b584d41 100644
--- a/include/llvm/Analysis/LoopInfo.h
+++ b/include/llvm/Analysis/LoopInfo.h
@@ -351,6 +351,9 @@ public:
/// by one each time through the loop. If so, return the phi node that
/// corresponds to it.
///
+ /// The IndVarSimplify pass transforms loops to have a canonical induction
+ /// variable.
+ ///
inline PHINode *getCanonicalInductionVariable() const {
BlockT *H = getHeader();
@@ -406,6 +409,9 @@ public:
/// of the loop executes N-1 times. If the trip-count cannot be determined,
/// this returns null.
///
+ /// The IndVarSimplify pass transforms loops to have a form that this
+ /// function easily understands.
+ ///
inline Value *getTripCount() const {
// Canonical loops will end with a 'cmp ne I, V', where I is the incremented
// canonical induction variable and V is the trip count of the loop.