Improve the LiveInterval class to keep track of which machine instruction

defines each value# tracked by the interval.  This will be used to improve
coallescing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29830 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2006-08-22 18:19:46 +00:00
parent ad6f758f89
commit be4f88a8b8
3 changed files with 63 additions and 19 deletions

View File

@ -388,7 +388,7 @@ void LiveInterval::join(LiveInterval &Other, unsigned CopyIdx) {
I->ValId = MergedDstValIdx;
else {
unsigned &NV = Dst2SrcIdxMap[I->ValId];
if (NV == 0) NV = getNextValue();
if (NV == 0) NV = getNextValue(Other.getInstForValNum(I->ValId));
I->ValId = NV;
}
@ -422,6 +422,20 @@ void LiveInterval::print(std::ostream &OS, const MRegisterInfo *MRI) const {
E = ranges.end(); I != E; ++I)
OS << *I;
}
// Print value number info.
if (NumValues) {
OS << " ";
for (unsigned i = 0; i != NumValues; ++i) {
if (i) OS << " ";
OS << i << "@";
if (InstDefiningValue[i] == ~0U) {
OS << "?";
} else {
OS << InstDefiningValue[i];
}
}
}
}
void LiveInterval::dump() const {