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 | be4f88a8b8bb3311e0dc4cde8533763d7923c3ea (patch) | |
tree | dbd4225eda79a2d8255d7bbfdc476656d343e9d8 /lib/CodeGen/LiveInterval.cpp | |
parent | ad6f758f8964bb091b5e443220ae3138d781b983 (diff) |
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
Diffstat (limited to 'lib/CodeGen/LiveInterval.cpp')
-rw-r--r-- | lib/CodeGen/LiveInterval.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp index b0f09297b3..0a2483e481 100644 --- a/lib/CodeGen/LiveInterval.cpp +++ b/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 { |