1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Value numbers whose def index is a special sentinel value should not be remapped.

llvm-svn: 54218
This commit is contained in:
Owen Anderson 2008-07-30 17:42:47 +00:00
parent df5916fff6
commit e6dca3efcb

View File

@ -176,6 +176,9 @@ void LiveIntervals::computeNumbering() {
// Remap the VNInfo def index, which works the same as the
// start indices above.
VNInfo* vni = LI->valno;
// VN's with special sentinel defs don't need to be remapped.
if (vni->def != ~0U && vni->def != ~1U) {
index = vni->def / InstrSlots::NUM;
offset = vni->def % InstrSlots::NUM;
if (offset == InstrSlots::LOAD) {
@ -186,10 +189,10 @@ void LiveIntervals::computeNumbering() {
(I == OldI2MBB.end() && OldI2MBB.size()>0) ? (I-1): I;
vni->def = getMBBStartIdx(J->second);
} else {
vni->def = mi2iMap_[OldI2MI[index]] + offset;
}
}
// Remap the VNInfo kill indices, which works the same as
// the end indices above.
@ -207,7 +210,6 @@ void LiveIntervals::computeNumbering() {
vni->kills[i] = getMBBEndIdx(I->second) + 1;
} else {
unsigned idx = index;
while (!OldI2MI[index]) ++index;
while (index < OldI2MI.size() && !OldI2MI[index]) ++index;
if (index != OldI2MI.size())