diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-08 07:48:37 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-08 07:48:37 +0000 |
commit | e5e95f7717bd25964e042b1b5ffae33fcf6f8974 (patch) | |
tree | 87af9a2f0464478f9a7a9d7c394bc57ff2414e8d /llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp | |
parent | 66c384ac2e65cf8bbae3fb5df3a4c1646913a473 (diff) | |
download | bcm5719-llvm-e5e95f7717bd25964e042b1b5ffae33fcf6f8974.tar.gz bcm5719-llvm-e5e95f7717bd25964e042b1b5ffae33fcf6f8974.zip |
(no commit message)
llvm-svn: 64073
Diffstat (limited to 'llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp index f09eee64b2c..75389a412a0 100644 --- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -42,6 +42,7 @@ STATISTIC(numExtends , "Number of copies extended"); STATISTIC(NumReMats , "Number of instructions re-materialized"); STATISTIC(numPeep , "Number of identity moves eliminated after coalescing"); STATISTIC(numAborts , "Number of times interval joining aborted"); +STATISTIC(numDeadValNo, "Number of valno def marked dead"); char SimpleRegisterCoalescing::ID = 0; static cl::opt<bool> @@ -863,9 +864,15 @@ SimpleRegisterCoalescing::ShortenDeadCopySrcLiveRange(LiveInterval &li, if (TrimLiveIntervalToLastUse(CopyIdx, CopyMI->getParent(), li, LR)) return false; - if (LR->valno->def == RemoveStart) - // If the def MI defines the val#, propagate the dead marker. - PropagateDeadness(li, CopyMI, RemoveStart, li_, tri_); + 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)) { + PropagateDeadness(li, CopyMI, RemoveStart, li_, tri_); + ++numDeadValNo; + } else + li.removeKill(LR->valno, RemoveEnd); + } removeRange(li, RemoveStart, LR->end, li_, tri_); return removeIntervalIfEmpty(li, li_, tri_); |