aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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
commit86fb9fdb2000213d3cd5a082e8501cb8fe974a14 (patch)
treec31cdc76fe2b0914bad4f7522e1c2481a60062ab /lib
parentf18134a1ae4cc8e064c3a30ece4d23a5ec75286a (diff)
downloadexternal_llvm-86fb9fdb2000213d3cd5a082e8501cb8fe974a14.zip
external_llvm-86fb9fdb2000213d3cd5a082e8501cb8fe974a14.tar.gz
external_llvm-86fb9fdb2000213d3cd5a082e8501cb8fe974a14.tar.bz2
Strengthen the previous check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SimpleRegisterCoalescing.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp
index a7d5d00..db7109e 100644
--- a/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/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;
}