summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-02-08 08:24:28 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-02-08 08:24:28 +0000
commit942519306e4ab48d30e5bd6c1713f79d6a5f1d42 (patch)
treec2de3241f2a383746a87b3f97f575d5635a8d555 /llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
parentfe014df914aa2e07a15d1c9eaa864570ec5c9949 (diff)
downloadbcm5719-llvm-942519306e4ab48d30e5bd6c1713f79d6a5f1d42.tar.gz
bcm5719-llvm-942519306e4ab48d30e5bd6c1713f79d6a5f1d42.zip
Strengthen the previous check.
llvm-svn: 64076
Diffstat (limited to 'llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
index a7d5d0075d2..db7109e7a63 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -489,7 +489,7 @@ static void removeRange(LiveInterval &li, unsigned Start, unsigned End,
}
/// TrimLiveIntervalToLastUse - If there is a last use in the same basic block
-/// as the copy instruction, trim the ive interval to the last use and return
+/// as the copy instruction, trim the live interval to the last use and return
/// true.
bool
SimpleRegisterCoalescing::TrimLiveIntervalToLastUse(unsigned CopyIdx,
@@ -867,9 +867,10 @@ 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))
- li.removeKill(LR->valno, RemoveEnd);
- else {
+ if (!li.isOnlyLROfValNo(LR)) {
+ if (li.isKill(LR->valno, RemoveEnd))
+ li.removeKill(LR->valno, RemoveEnd);
+ } else {
PropagateDeadness(li, CopyMI, RemoveStart, li_, tri_);
++numDeadValNo;
}
OpenPOWER on IntegriCloud