[llvm-commits] [llvm] r64075 - /llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp

Evan Cheng evan.cheng at apple.com
Sun Feb 8 00:00:37 PST 2009


Author: evancheng
Date: Sun Feb  8 02:00:36 2009
New Revision: 64075

URL: http://llvm.org/viewvc/llvm-project?rev=64075&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp

Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=64075&r1=64074&r2=64075&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Sun Feb  8 02:00:36 2009
@@ -867,11 +867,12 @@
   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_);





More information about the llvm-commits mailing list