mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Correctly handle removed instructions at the beginning of MBBs when renumbering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51876 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
98e3a6829a
commit
e3abb0a858
@ -128,13 +128,11 @@ void LiveIntervals::computeNumbering() {
|
||||
i++;
|
||||
} while (!newInstr);
|
||||
|
||||
MachineInstr* preceding = i2miMap_[(mi2iMap_[newInstr] -
|
||||
InstrSlots::NUM) / InstrSlots::NUM];
|
||||
if (preceding->getParent() == newInstr->getParent() &&
|
||||
preceding->modifiesRegister(I->second.reg))
|
||||
LI->start = mi2iMap_[newInstr] - InstrSlots::NUM + offset;
|
||||
else
|
||||
if (mi2iMap_[newInstr] ==
|
||||
MBB2IdxMap[newInstr->getParent()->getNumber()].first)
|
||||
LI->start = mi2iMap_[newInstr];
|
||||
else
|
||||
LI->start = mi2iMap_[newInstr] - InstrSlots::NUM + offset;
|
||||
}
|
||||
|
||||
// Remap the ending index in the same way that we remapped the start,
|
||||
@ -172,13 +170,11 @@ void LiveIntervals::computeNumbering() {
|
||||
i++;
|
||||
} while (!newInstr);
|
||||
|
||||
MachineInstr* preceding = i2miMap_[(mi2iMap_[newInstr] -
|
||||
InstrSlots::NUM) / InstrSlots::NUM];
|
||||
if (preceding->getParent() == newInstr->getParent() &&
|
||||
preceding->modifiesRegister(I->second.reg))
|
||||
vni->def = mi2iMap_[newInstr] - InstrSlots::NUM + offset;
|
||||
else
|
||||
if (mi2iMap_[newInstr] ==
|
||||
MBB2IdxMap[newInstr->getParent()->getNumber()].first)
|
||||
vni->def = mi2iMap_[newInstr];
|
||||
else
|
||||
vni->def = mi2iMap_[newInstr] - InstrSlots::NUM + offset;
|
||||
}
|
||||
|
||||
// Remap the VNInfo kill indices, which works the same as
|
||||
|
Loading…
Reference in New Issue
Block a user