summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-05 15:18:18 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-05 15:18:18 +0000
commitfe6e07fd8a678229f38abfaae465e2147caef8e8 (patch)
treec4a359c53583570b5b18d48a7ab741828ff03682 /llvm/include
parenta9c7c14ebb3ece7763dc8e577bad6974b56ea6d7 (diff)
downloadbcm5719-llvm-fe6e07fd8a678229f38abfaae465e2147caef8e8.tar.gz
bcm5719-llvm-fe6e07fd8a678229f38abfaae465e2147caef8e8.zip
Use std::unique instead of a SmallPtrSet to ensure unique instructions in UseSlots.
This allows us to always keep the smaller slot for an instruction which is what we want when a register has early clobber defines. Drop the UsingInstrs set and the UsingBlocks map. They are no longer needed. llvm-svn: 128886
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/CodeGen/SlotIndexes.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/SlotIndexes.h b/llvm/include/llvm/CodeGen/SlotIndexes.h
index 7cc31563b63..dc247132c8f 100644
--- a/llvm/include/llvm/CodeGen/SlotIndexes.h
+++ b/llvm/include/llvm/CodeGen/SlotIndexes.h
@@ -178,6 +178,11 @@ namespace llvm {
return getIndex() >= other.getIndex();
}
+ /// isSameInstr - Return true if A and B refer to the same instruction.
+ static bool isSameInstr(SlotIndex A, SlotIndex B) {
+ return A.lie.getPointer() == B.lie.getPointer();
+ }
+
/// Return the distance from this index to the given one.
int distance(SlotIndex other) const {
return other.getIndex() - getIndex();
OpenPOWER on IntegriCloud