mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Down-scale slot index distance to save bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187438 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -218,6 +218,13 @@ namespace llvm {
|
|||||||
return other.getIndex() - getIndex();
|
return other.getIndex() - getIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Return the scaled distance from this index to the given one, where all
|
||||||
|
/// slots on the same instruction have zero distance.
|
||||||
|
int getInstrDistance(SlotIndex other) const {
|
||||||
|
return (other.listEntry()->getIndex() - listEntry()->getIndex())
|
||||||
|
/ Slot_Count;
|
||||||
|
}
|
||||||
|
|
||||||
/// isBlock - Returns true if this is a block boundary slot.
|
/// isBlock - Returns true if this is a block boundary slot.
|
||||||
bool isBlock() const { return getSlot() == Slot_Block; }
|
bool isBlock() const { return getSlot() == Slot_Block; }
|
||||||
|
|
||||||
|
@@ -419,7 +419,7 @@ void RAGreedy::enqueue(LiveInterval *LI) {
|
|||||||
// Allocate original local ranges in linear instruction order. Since they
|
// Allocate original local ranges in linear instruction order. Since they
|
||||||
// are singly defined, this produces optimal coloring in the absence of
|
// are singly defined, this produces optimal coloring in the absence of
|
||||||
// global interference and other constraints.
|
// global interference and other constraints.
|
||||||
Prio = LI->beginIndex().distance(Indexes->getLastIndex());
|
Prio = LI->beginIndex().getInstrDistance(Indexes->getLastIndex());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Allocate global and split ranges in long->short order. Long ranges that
|
// Allocate global and split ranges in long->short order. Long ranges that
|
||||||
|
Reference in New Issue
Block a user