[llvm-commits] [llvm] r72091 - /llvm/trunk/include/llvm/Analysis/LoopInfo.h

Dan Gohman gohman at apple.com
Mon May 18 18:52:46 PDT 2009


Author: djg
Date: Mon May 18 20:52:46 2009
New Revision: 72091

URL: http://llvm.org/viewvc/llvm-project?rev=72091&view=rev
Log:
Add some comments noting how IndVarSimplify facilitates
LoopInfo functionality.

Modified:
    llvm/trunk/include/llvm/Analysis/LoopInfo.h

Modified: llvm/trunk/include/llvm/Analysis/LoopInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopInfo.h?rev=72091&r1=72090&r2=72091&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopInfo.h Mon May 18 20:52:46 2009
@@ -351,6 +351,9 @@
   /// 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 @@
   /// 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.





More information about the llvm-commits mailing list