Put all IVUsers in the processed set. Allow querying IVUsers with isIVUserOrOperand.
[oota-llvm.git] / include / llvm / Analysis / IVUsers.h
index e56d24d583dfad6ef44859f77ef174e80a29b832..2a3bb9bc48061babe68c5f19132109e0f3126d1b 100644 (file)
@@ -140,6 +140,8 @@ public:
   static char ID; // Pass ID, replacement for typeid
   IVUsers();
 
+  Loop *getLoop() const { return L; }
+
   /// 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.
@@ -164,6 +166,10 @@ public:
   const_iterator end() const   { return IVUses.end(); }
   bool empty() const { return IVUses.empty(); }
 
+  bool isIVUserOrOperand(Instruction *Inst) const {
+    return Processed.count(Inst);
+  }
+
   void print(raw_ostream &OS, const Module* = 0) const;
 
   /// dump - This method is used for debugging.