[llvm-commits] [llvm] r163972 - /llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Sat Sep 15 09:32:11 PDT 2012


Author: stoklund
Date: Sat Sep 15 11:32:11 2012
New Revision: 163972

URL: http://llvm.org/viewvc/llvm-project?rev=163972&view=rev
Log:
Don't depend on kill flags in removeCopyByCommutingDef().

Kill flags are removed more and more aggressively during the register
allocation passes, it is better to get information from LiveIntervals.

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

Modified: llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp?rev=163972&r1=163971&r2=163972&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp Sat Sep 15 11:32:11 2012
@@ -583,7 +583,7 @@
 
   MachineOperand &NewDstMO = DefMI->getOperand(NewDstIdx);
   unsigned NewReg = NewDstMO.getReg();
-  if (NewReg != IntB.reg || !NewDstMO.isKill())
+  if (NewReg != IntB.reg || !LiveRangeQuery(IntB, AValNo->def).isKill())
     return false;
 
   // Make sure there are no other definitions of IntB that would reach the





More information about the llvm-commits mailing list