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 | f22ca3fe5f0cfbb832cf41270f97cf5c0134fd7b (patch) | |
tree | db0733bc6370b0714ba03a280821bc5375b2d0ce /lib/CodeGen/LiveRangeEdit.cpp | |
parent | 9f86e8054b5c29c82dbcff6fdb1dcefa122fe7ce (diff) | |
download | llvm-f22ca3fe5f0cfbb832cf41270f97cf5c0134fd7b.tar.gz llvm-f22ca3fe5f0cfbb832cf41270f97cf5c0134fd7b.tar.bz2 llvm-f22ca3fe5f0cfbb832cf41270f97cf5c0134fd7b.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128524 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveRangeEdit.cpp')
-rw-r--r-- | lib/CodeGen/LiveRangeEdit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveRangeEdit.cpp b/lib/CodeGen/LiveRangeEdit.cpp index 6b8a533b66..4c7b9e6be9 100644 --- a/lib/CodeGen/LiveRangeEdit.cpp +++ b/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()); } } |