Added methods to get the live range immediately before a given slot. Intended to...
authorLang Hames <lhames@gmail.com>
Thu, 19 Jan 2012 01:36:06 +0000 (01:36 +0000)
committerLang Hames <lhames@gmail.com>
Thu, 19 Jan 2012 01:36:06 +0000 (01:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148453 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/LiveInterval.h

index dd95c5b9823b9d44729812bf53ce0f4ff3a70557..885f9bb8a5a11ccf0d7a537de2cef5ee04e8d20d 100644 (file)
@@ -405,6 +405,14 @@ namespace llvm {
       return I == end() ? 0 : &*I;
     }
 
+    const LiveRange *getLiveRangeBefore(SlotIndex Idx) const {
+      return getLiveRangeContaining(Idx.getPrevSlot());
+    }
+
+    LiveRange *getLiveRangeBefore(SlotIndex Idx) {
+      return getLiveRangeContaining(Idx.getPrevSlot());
+    }
+
     /// getVNInfoAt - Return the VNInfo that is live at Idx, or NULL.
     VNInfo *getVNInfoAt(SlotIndex Idx) const {
       const_iterator I = FindLiveRangeContaining(Idx);