[llvm-commits] [llvm] r148453 - /llvm/trunk/include/llvm/CodeGen/LiveInterval.h

Lang Hames lhames at gmail.com
Wed Jan 18 17:36:06 PST 2012


Author: lhames
Date: Wed Jan 18 19:36:06 2012
New Revision: 148453

URL: http://llvm.org/viewvc/llvm-project?rev=148453&view=rev
Log:
Added methods to get the live range immediately before a given slot. Intended to parallel the getVNInfoBefore method.

Modified:
    llvm/trunk/include/llvm/CodeGen/LiveInterval.h

Modified: llvm/trunk/include/llvm/CodeGen/LiveInterval.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveInterval.h?rev=148453&r1=148452&r2=148453&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveInterval.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveInterval.h Wed Jan 18 19:36:06 2012
@@ -405,6 +405,14 @@
       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);





More information about the llvm-commits mailing list