checkpoint of the new PHITransAddr code, still not done and not used by
[oota-llvm.git] / include / llvm / Analysis / IVUsers.h
index e4820f0053db765f4c20a451272c121de18f8cf5..22fbb35cdb928f354eb62c5fe0cb8ec203b90685 100644 (file)
@@ -25,7 +25,7 @@ namespace llvm {
 class DominatorTree;
 class Instruction;
 class Value;
-class IVUsersOfOneStride;
+struct IVUsersOfOneStride;
 
 /// IVStrideUse - Keep track of one use of a strided induction variable, where
 /// the stride is stored externally.  The Offset member keeps track of the
@@ -161,6 +161,10 @@ public:
   void addUser(const SCEV *Offset, Instruction *User, Value *Operand) {
     Users.push_back(new IVStrideUse(this, Offset, User, Operand));
   }
+
+  void removeUser(IVStrideUse *User) {
+    Users.erase(User);
+  }
 };
 
 class IVUsers : public LoopPass {
@@ -201,15 +205,14 @@ public:
   /// return true.  Otherwise, return false.
   bool AddUsersIfInteresting(Instruction *I);
 
+  void AddUser(const SCEV *Stride, const SCEV *Offset,
+               Instruction *User, Value *Operand);
+
   /// getReplacementExpr - Return a SCEV expression which computes the
   /// value of the OperandValToReplace of the given IVStrideUse.
   const SCEV *getReplacementExpr(const IVStrideUse &U) const;
 
   void print(raw_ostream &OS, const Module* = 0) const;
-  virtual void print(std::ostream &OS, const Module* = 0) const;
-  void print(std::ostream *OS, const Module* M = 0) const {
-    if (OS) print(*OS, M);
-  }
 
   /// dump - This method is used for debugging.
   void dump() const;