summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-02-08 08:00:36 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-02-08 08:00:36 +0000
commitfe014df914aa2e07a15d1c9eaa864570ec5c9949 (patch)
treee264b6fcfff7ad48b9cbae2be41573a25a981957 /llvm
parentf876bc93885d9a54463c6db61d944fccd5ab9bc9 (diff)
downloadbcm5719-llvm-fe014df914aa2e07a15d1c9eaa864570ec5c9949.tar.gz
bcm5719-llvm-fe014df914aa2e07a15d1c9eaa864570ec5c9949.zip
r64073 commit message is lost. Here it is:
Right now if the coalesced copy def is dead and its src is a kill, and that there are now other uses within the live range, the coalescer would mark the def of the source register as dead. But it should also check if there are other kills which means the value has other uses not in the live range. llvm-svn: 64075
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 75389a412a0..a7d5d0075d2 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -867,11 +867,12 @@ SimpleRegisterCoalescing::ShortenDeadCopySrcLiveRange(LiveInterval &li,
if (LR->valno->def == RemoveStart) {
// If the def MI defines the val# and this copy is the only kill of the
// val#, then propagate the dead marker.
- if (li.isOnlyKill(LR->valno, RemoveEnd)) {
+ if (!li.isOnlyKill(LR->valno, RemoveEnd))
+ li.removeKill(LR->valno, RemoveEnd);
+ else {
PropagateDeadness(li, CopyMI, RemoveStart, li_, tri_);
++numDeadValNo;
- } else
- li.removeKill(LR->valno, RemoveEnd);
+ }
}
removeRange(li, RemoveStart, LR->end, li_, tri_);
OpenPOWER on IntegriCloud