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

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Sep 15 08:31:49 PDT 2011


Author: stoklund
Date: Thu Sep 15 10:31:49 2011
New Revision: 139793

URL: http://llvm.org/viewvc/llvm-project?rev=139793&view=rev
Log:
Use getPrevSlot() instead of getPrevIndex().

The getPrevIndex() function moves to the same slot in the previous
instruction.  For getVNInfoBefore(), we just need the previous slot in
the same instruction.

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=139793&r1=139792&r2=139793&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveInterval.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveInterval.h Thu Sep 15 10:31:49 2011
@@ -415,7 +415,7 @@
     /// necessarilly including Idx, or NULL. Use this to find the reaching def
     /// used by an instruction at this SlotIndex position.
     VNInfo *getVNInfoBefore(SlotIndex Idx) const {
-      const_iterator I = FindLiveRangeContaining(Idx.getPrevIndex());
+      const_iterator I = FindLiveRangeContaining(Idx.getPrevSlot());
       return I == end() ? 0 : I->valno;
     }
 





More information about the llvm-commits mailing list