1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

Add some comments noting how IndVarSimplify facilitates

LoopInfo functionality.

llvm-svn: 72091
This commit is contained in:
Dan Gohman 2009-05-19 01:52:46 +00:00
parent de192dfaee
commit aa59d257a4

View File

@ -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.