summaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-08-31 05:58:59 +0000
committerChris Lattner <sabre@nondot.org>2006-08-31 05:58:59 +0000
commitbfe180af9eef1cf767f61f501ca325fcce2ae7ce (patch)
tree9e2d3d10cddc1092dd1095f171e0bf34c066e8ab /lib/CodeGen
parent91725b75852443923b419fd23215194cfc65dd88 (diff)
downloadllvm-bfe180af9eef1cf767f61f501ca325fcce2ae7ce.tar.gz
llvm-bfe180af9eef1cf767f61f501ca325fcce2ae7ce.tar.bz2
llvm-bfe180af9eef1cf767f61f501ca325fcce2ae7ce.tar.xz
Delete copies as they are coallesced instead of waiting until the end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 82389b20b3..b4bbb668b6 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -823,6 +823,10 @@ bool LiveIntervals::JoinCopy(MachineInstr *CopyMI,
r2iMap_.erase(SrcReg);
r2rMap_[SrcReg] = DstReg;
+ // Finally, delete the copy instruction.
+ RemoveMachineInstrFromMaps(CopyMI);
+ CopyMI->eraseFromParent();
+ ++numPeep;
++numJoins;
return true;
}