Drop Loop::isNotAlreadyContainedIn in favor of Loop::contains. The
[oota-llvm.git] / include / llvm / Analysis / PHITransAddr.h
index 1f4f3416da8dce53d088a0de329bb8224880a09c..b61231605752739986a7793310314d2bea6b70e8 100644 (file)
@@ -80,6 +80,13 @@ public:
   Value *PHITranslateWithInsertion(BasicBlock *CurBB, BasicBlock *PredBB,
                                    const DominatorTree &DT,
                                    SmallVectorImpl<Instruction*> &NewInsts);
+  
+  void dump() const;
+  
+  /// Verify - Check internal consistency of this data structure.  If the
+  /// structure is valid, it returns true.  If invalid, it prints errors and
+  /// returns false.
+  bool Verify() const;
 private:
   Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB);
   
@@ -98,6 +105,15 @@ private:
   Value *InsertPHITranslatedSubExpr(Value *InVal, BasicBlock *CurBB,
                                     BasicBlock *PredBB, const DominatorTree &DT,
                                     SmallVectorImpl<Instruction*> &NewInsts);
+  
+  /// AddAsInput - If the specified value is an instruction, add it as an input.
+  Value *AddAsInput(Value *V) {
+    // If V is an instruction, it is now an input.
+    if (Instruction *VI = dyn_cast<Instruction>(V))
+      InstInputs.push_back(VI);
+    return V;
+  }
+  
 };
 
 } // end namespace llvm