mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:50:30 +00:00
Properly remap live ranges whose end indices are the end of the function.
llvm-svn: 54061
This commit is contained in:
parent
c28f2265a4
commit
fe97082ddd
@ -168,8 +168,12 @@ void LiveIntervals::computeNumbering() {
|
||||
LI->end = getMBBEndIdx(J->second) + 1;
|
||||
} else {
|
||||
unsigned idx = index;
|
||||
while (!OldI2MI[index]) ++index;
|
||||
LI->end = mi2iMap_[OldI2MI[index]] + (idx == index ? offset : 0);
|
||||
while (index < OldI2MI.size() && !OldI2MI[index]) ++index;
|
||||
|
||||
if (index != OldI2MI.size())
|
||||
LI->end = mi2iMap_[OldI2MI[index]] + (idx == index ? offset : 0);
|
||||
else
|
||||
LI->end = InstrSlots::NUM * i2miMap_.size();
|
||||
}
|
||||
|
||||
// Remap the VNInfo def index, which works the same as the
|
||||
@ -208,8 +212,13 @@ void LiveIntervals::computeNumbering() {
|
||||
} else {
|
||||
unsigned idx = index;
|
||||
while (!OldI2MI[index]) ++index;
|
||||
vni->kills[i] = mi2iMap_[OldI2MI[index]] +
|
||||
(idx == index ? offset : 0);
|
||||
while (index < OldI2MI.size() && !OldI2MI[index]) ++index;
|
||||
|
||||
if (index != OldI2MI.size())
|
||||
vni->kills[i] = mi2iMap_[OldI2MI[index]] +
|
||||
(idx == index ? offset : 0);
|
||||
else
|
||||
vni->kills[i] = InstrSlots::NUM * i2miMap_.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user