diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-08-22 18:19:46 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-08-22 18:19:46 +0000 |
| commit | 2e9f1bc056f3a4467e4c59a1631aa1e0c73b7ddf (patch) | |
| tree | 8f1349c86325c4c98d4ccff0c63c42881ed4dbdb /llvm/lib/CodeGen/LiveInterval.cpp | |
| parent | 06725191abb5d864fa6e1c43abf3ea0111bfcc47 (diff) | |
| download | bcm5719-llvm-2e9f1bc056f3a4467e4c59a1631aa1e0c73b7ddf.tar.gz bcm5719-llvm-2e9f1bc056f3a4467e4c59a1631aa1e0c73b7ddf.zip | |
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.
llvm-svn: 29830
Diffstat (limited to 'llvm/lib/CodeGen/LiveInterval.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/LiveInterval.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp index b0f09297b3e..0a2483e481b 100644 --- a/llvm/lib/CodeGen/LiveInterval.cpp +++ b/llvm/lib/CodeGen/LiveInterval.cpp @@ -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 { |

