mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128886 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user