summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-03 05:18:15 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-03 05:18:15 +0000
commitdb13110e4dce0f0b40d22e5b281df8549d2871e8 (patch)
tree4c520a182e2ac0416391f5f697f4a6b6d9367e78
parenta04dddf7a17ec6d90d2f8df9b54e517794c0f0f8 (diff)
downloadbcm5719-llvm-db13110e4dce0f0b40d22e5b281df8549d2871e8.tar.gz
bcm5719-llvm-db13110e4dce0f0b40d22e5b281df8549d2871e8.zip
Optimize SlotIndex equality tests.
IndexListEntries have unique indexes, so it is not necessary to dereference pointers to them. llvm-svn: 126923
-rw-r--r--llvm/include/llvm/CodeGen/SlotIndexes.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/CodeGen/SlotIndexes.h b/llvm/include/llvm/CodeGen/SlotIndexes.h
index 1da1e91be14..8d3b1c09335 100644
--- a/llvm/include/llvm/CodeGen/SlotIndexes.h
+++ b/llvm/include/llvm/CodeGen/SlotIndexes.h
@@ -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
OpenPOWER on IntegriCloud