[llvm-commits] [llvm] r49544 - /llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp

Evan Cheng evan.cheng at apple.com
Fri Apr 11 10:55:47 PDT 2008


Author: evancheng
Date: Fri Apr 11 12:55:47 2008
New Revision: 49544

URL: http://llvm.org/viewvc/llvm-project?rev=49544&view=rev
Log:
Do not add empty live intervals to handled_. They should never be undone for backtracking.

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

Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=49544&r1=49543&r2=49544&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Fri Apr 11 12:55:47 2008
@@ -519,7 +519,6 @@
     DOUT <<  tri_->getName(physReg) << '\n';
     // Note the register is not really in use.
     vrm_->assignVirt2Phys(cur->reg, physReg);
-    handled_.push_back(cur);
     return;
   }
 
@@ -539,7 +538,7 @@
     if (vni->def && vni->def != ~1U && vni->def != ~0U) {
       MachineInstr *CopyMI = li_->getInstructionFromIndex(vni->def);
       unsigned SrcReg, DstReg;
-      if (tii_->isMoveInstr(*CopyMI, SrcReg, DstReg)) {
+      if (CopyMI && tii_->isMoveInstr(*CopyMI, SrcReg, DstReg)) {
         unsigned Reg = 0;
         if (TargetRegisterInfo::isPhysicalRegister(SrcReg))
           Reg = SrcReg;





More information about the llvm-commits mailing list