Optimize SlotIndex equality tests.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 3 Mar 2011 05:18:15 +0000 (05:18 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 3 Mar 2011 05:18:15 +0000 (05:18 +0000)
IndexListEntries have unique indexes, so it is not necessary to dereference
pointers to them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126923 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/SlotIndexes.h

index 1da1e91be14abdf8c26b1997461af5945c9fe633..8d3b1c09335ffd99543464e3d9084249d3f6d6b5 100644 (file)
@@ -187,11 +187,11 @@ namespace llvm {
 
     /// 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