[LoopAccesses] Create the analysis pass
[oota-llvm.git] / include / llvm / Analysis / PHITransAddr.h
index ff9a24790a9973e642dc9805dd7163364280d31d..38730d8ea4f3c61a5733c92347c53bc9ded1eb5c 100644 (file)
 #ifndef LLVM_ANALYSIS_PHITRANSADDR_H
 #define LLVM_ANALYSIS_PHITRANSADDR_H
 
-#include "llvm/Instruction.h"
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/IR/Instruction.h"
 
 namespace llvm {
+  class AssumptionCache;
   class DominatorTree;
-  class TargetData;
+  class DataLayout;
   class TargetLibraryInfo;
 
 /// PHITransAddr - An address value which tracks and handles phi translation.
@@ -36,16 +37,20 @@ class PHITransAddr {
   /// Addr - The actual address we're analyzing.
   Value *Addr;
   
-  /// TD - The target data we are playing with if known, otherwise null.
-  const TargetData *TD;
+  /// The DataLayout we are playing with if known, otherwise null.
+  const DataLayout *DL;
 
   /// TLI - The target library info if known, otherwise null.
   const TargetLibraryInfo *TLI;
-  
+
+  /// A cache of @llvm.assume calls used by SimplifyInstruction.
+  AssumptionCache *AC;
+
   /// InstInputs - The inputs for our symbolic address.
   SmallVector<Instruction*, 4> InstInputs;
 public:
-  PHITransAddr(Value *addr, const TargetData *td) : Addr(addr), TD(td), TLI(0) {
+  PHITransAddr(Value *addr, const DataLayout *DL, AssumptionCache *AC)
+      : Addr(addr), DL(DL), TLI(nullptr), AC(AC) {
     // If the address is an instruction, the whole thing is considered an input.
     if (Instruction *I = dyn_cast<Instruction>(Addr))
       InstInputs.push_back(I);