[llvm-commits] [llvm] r126923 - /llvm/trunk/include/llvm/CodeGen/SlotIndexes.h

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Mar 2 21:18:15 PST 2011


Author: stoklund
Date: Wed Mar  2 23:18:15 2011
New Revision: 126923

URL: http://llvm.org/viewvc/llvm-project?rev=126923&view=rev
Log:
Optimize SlotIndex equality tests.

IndexListEntries have unique indexes, so it is not necessary to dereference
pointers to them.

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

Modified: llvm/trunk/include/llvm/CodeGen/SlotIndexes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SlotIndexes.h?rev=126923&r1=126922&r2=126923&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SlotIndexes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SlotIndexes.h Wed Mar  2 23:18:15 2011
@@ -187,11 +187,11 @@
 
     /// Compare two SlotIndex objects for equality.
     bool operator==(SlotIndex other) const {
-      return getIndex() == other.getIndex();
+      return lie == other.lie;
     }
     /// Compare two SlotIndex objects for inequality.
     bool operator!=(SlotIndex other) const {
-      return getIndex() != other.getIndex(); 
+      return lie != other.lie;
     }
    
     /// Compare two SlotIndex objects. Return true if the first index





More information about the llvm-commits mailing list