Add comments.
[oota-llvm.git] / include / llvm / Analysis / IVUsers.h
index 7aa34f1cff4d0898bf793e41657a277ef99f90ec..578e6aba8338521203b1ec760193012680c32c98 100644 (file)
@@ -27,7 +27,6 @@ class Value;
 class IVUsers;
 class ScalarEvolution;
 class SCEV;
-class SCEVAddRecExpr;
 class IVUsers;
 
 /// IVStrideUse - Keep track of one use of a strided induction variable.
@@ -123,7 +122,7 @@ class IVUsers : public LoopPass {
   LoopInfo *LI;
   DominatorTree *DT;
   ScalarEvolution *SE;
-  SmallPtrSet<Instruction *, 16> Processed;
+  SmallPtrSet<Instruction*,16> Processed;
 
   /// IVUses - A list of all tracked IV uses of induction variable expressions
   /// we are interested in.
@@ -135,16 +134,14 @@ class IVUsers : public LoopPass {
 
   virtual void releaseMemory();
 
-  const SCEVAddRecExpr *findInterestingAddRec(const SCEV *S) const;
-  bool isInterestingUser(const Instruction *User) const;
-
 public:
   static char ID; // Pass ID, replacement for typeid
   IVUsers();
 
-  /// AddUsersIfInteresting - Inspect the def-use graph starting at the
-  /// specified Instruction and add IVUsers.
-  void AddUsersIfInteresting(Instruction *I);
+  /// AddUsersIfInteresting - Inspect the specified Instruction.  If it is a
+  /// reducible SCEV, recursively add its users to the IVUsesByStride set and
+  /// return true.  Otherwise, return false.
+  bool AddUsersIfInteresting(Instruction *I);
 
   IVStrideUse &AddUser(Instruction *User, Value *Operand);