Do not add empty live intervals to handled_. They should never be undone for backtrac...
authorEvan Cheng <evan.cheng@apple.com>
Fri, 11 Apr 2008 17:55:47 +0000 (17:55 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 11 Apr 2008 17:55:47 +0000 (17:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49544 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocLinearScan.cpp

index 19c7da1d52537f50f02ee00631799f7ac495ba15..456ee6319c146cf1ea21c9cb36cec266fa3d10f9 100644 (file)
@@ -519,7 +519,6 @@ void RALinScan::assignRegOrStackSlotAtInterval(LiveInterval* cur)
     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 @@ void RALinScan::assignRegOrStackSlotAtInterval(LiveInterval* cur)
     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;