mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
Fix a bug that occurs when the last instruction in a range is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15005 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -208,9 +208,12 @@ std::vector<LiveInterval*> LiveIntervals::addIntervalsForSpills(
|
||||
i = li.ranges.begin(), e = li.ranges.end(); i != e; ++i) {
|
||||
unsigned index = getBaseIndex(i->first);
|
||||
unsigned end = getBaseIndex(i->second-1) + InstrSlots::NUM;
|
||||
for (; index < end; index += InstrSlots::NUM) {
|
||||
for (; index != end; index += InstrSlots::NUM) {
|
||||
// skip deleted instructions
|
||||
while (!getInstructionFromIndex(index)) index += InstrSlots::NUM;
|
||||
while (index != end && !getInstructionFromIndex(index))
|
||||
index += InstrSlots::NUM;
|
||||
if (index == end) break;
|
||||
|
||||
MachineBasicBlock::iterator mi = getInstructionFromIndex(index);
|
||||
|
||||
for_operand:
|
||||
|
Reference in New Issue
Block a user