1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

Correctly handle removed instructions at the beginning of MBBs when renumbering.

llvm-svn: 51876
This commit is contained in:
Owen Anderson 2008-06-02 17:36:36 +00:00
parent 06e4c8a420
commit 54660d1fcf

View File

@ -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