summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit78cca7243c265eb799da06dba0d3d86fa24f6b7b (patch)
tree323d64c6ae5b1caa5dd2496a56b3aa4de897fa2b /llvm/lib/CodeGen
parentaa36808fd36b1d7d3975f44b5e9a0a2edc9ce585 (diff)
downloadbcm5719-llvm-78cca7243c265eb799da06dba0d3d86fa24f6b7b.tar.gz
bcm5719-llvm-78cca7243c265eb799da06dba0d3d86fa24f6b7b.zip
Delete copies as they are coallesced instead of waiting until the end.
llvm-svn: 29995
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 82389b20b32..b4bbb668b68 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud