Add DebugLoc-aware constructors for SDNode derived
[oota-llvm.git] / include / llvm / CodeGen / LiveStackAnalysis.h
index 5c88bb83c5292dc3ed51f800ca71bd5d905e444e..7cb4151e87053c3f53595bcea18b5de9d27afea9 100644 (file)
@@ -52,6 +52,22 @@ namespace llvm {
       return I->second;
     }
 
+    LiveInterval &getInterval(int Slot) {
+      SS2IntervalMap::iterator I = s2iMap.find(Slot);
+      assert(I != s2iMap.end() && "Interval does not exist for stack slot");
+      return I->second;
+    }
+
+    const LiveInterval &getInterval(int Slot) const {
+      SS2IntervalMap::const_iterator I = s2iMap.find(Slot);
+      assert(I != s2iMap.end() && "Interval does not exist for stack slot");
+      return I->second;
+    }
+
+    bool hasInterval(unsigned Slot) const {
+      return s2iMap.count(Slot);
+    }
+
     BumpPtrAllocator& getVNInfoAllocator() { return VNInfoAllocator; }
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const;