mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user