diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-03-30 02:52:39 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-03-30 02:52:39 +0000 |
| commit | dd9a2ecef75a10a67faf96981619012b669ef1e8 (patch) | |
| tree | 601cbfceaaaf79aa995e0e4099282648df82f3a2 /llvm/lib/CodeGen/LiveRangeEdit.cpp | |
| parent | 406ef962d94c9d8e1984a87e5adda586c966e85a (diff) | |
| download | bcm5719-llvm-dd9a2ecef75a10a67faf96981619012b669ef1e8.tar.gz bcm5719-llvm-dd9a2ecef75a10a67faf96981619012b669ef1e8.zip | |
Treat clones the same as their origin.
When DCE clones a live range because it separates into connected components,
make sure that the clones enter the same register allocator stage as the
register they were cloned from.
For instance, clones may be split even when they where created during spilling.
Other registers created during spilling are not candidates for splitting or even
(re-)spilling.
llvm-svn: 128524
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeEdit.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/LiveRangeEdit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp index 6b8a533b66b..4c7b9e6be9e 100644 --- a/llvm/lib/CodeGen/LiveRangeEdit.cpp +++ b/llvm/lib/CodeGen/LiveRangeEdit.cpp @@ -231,8 +231,11 @@ void LiveRangeEdit::eliminateDeadDefs(SmallVectorImpl<MachineInstr*> &Dead, continue; DEBUG(dbgs() << NumComp << " components: " << *LI << '\n'); SmallVector<LiveInterval*, 8> Dups(1, LI); - for (unsigned i = 1; i != NumComp; ++i) + for (unsigned i = 1; i != NumComp; ++i) { Dups.push_back(&createFrom(LI->reg, LIS, VRM)); + if (delegate_) + delegate_->LRE_DidCloneVirtReg(Dups.back()->reg, LI->reg); + } ConEQ.Distribute(&Dups[0], VRM.getRegInfo()); } } |

