aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SimpleRegisterCoalescing.cpp
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
commitf1162978c6e979010cf65a8ecaa7d3f644f8d31a (patch)
tree4e94c25ff2c8b49fe9439eadfef59ca3d6bb6fe7 /lib/CodeGen/SimpleRegisterCoalescing.cpp
parent69b8873a33af59f7ded4f5e1924bfe3f4cdd48e5 (diff)
downloadexternal_llvm-f1162978c6e979010cf65a8ecaa7d3f644f8d31a.tar.gz
external_llvm-f1162978c6e979010cf65a8ecaa7d3f644f8d31a.tar.bz2
external_llvm-f1162978c6e979010cf65a8ecaa7d3f644f8d31a.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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64075 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r--lib/CodeGen/SimpleRegisterCoalescing.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 75389a412a..a7d5d0075d 100644
--- a/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/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_);