mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-20 09:24:58 +00:00
When creating intervals, leave min(1, numdefs) holes after each instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57765 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4ae14bc1f5
commit
99fe34b9b2
@ -130,8 +130,12 @@ void LiveIntervals::computeNumbering() {
|
|||||||
MIIndex += InstrSlots::NUM;
|
MIIndex += InstrSlots::NUM;
|
||||||
FunctionSize++;
|
FunctionSize++;
|
||||||
|
|
||||||
// Insert an empty slot after every instruction.
|
// Insert min(1, numdefs) empty slots after every instruction.
|
||||||
MIIndex += InstrSlots::NUM;
|
unsigned Slots = I->getDesc().getNumDefs();
|
||||||
|
if (Slots == 0)
|
||||||
|
Slots = 1;
|
||||||
|
MIIndex += InstrSlots::NUM * Slots;
|
||||||
|
while (Slots--)
|
||||||
i2miMap_.push_back(0);
|
i2miMap_.push_back(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -733,7 +737,11 @@ void LiveIntervals::computeIntervals() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MIIndex += InstrSlots::NUM;
|
// Skip over the empty slots after each instruction.
|
||||||
|
unsigned Slots = MI->getDesc().getNumDefs();
|
||||||
|
if (Slots == 0)
|
||||||
|
Slots = 1;
|
||||||
|
MIIndex += InstrSlots::NUM * Slots;
|
||||||
|
|
||||||
// Skip over empty indices.
|
// Skip over empty indices.
|
||||||
while (MIIndex / InstrSlots::NUM < i2miMap_.size() &&
|
while (MIIndex / InstrSlots::NUM < i2miMap_.size() &&
|
||||||
|
Loading…
Reference in New Issue
Block a user