From 305d268ac3de3513a38ae9de7099ee3c0d74f6a3 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 11 Apr 2008 17:55:47 +0000 Subject: Do not add empty live intervals to handled_. They should never be undone for backtracking. llvm-svn: 49544 --- llvm/lib/CodeGen/RegAllocLinearScan.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/RegAllocLinearScan.cpp') diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp index 19c7da1d525..456ee6319c1 100644 --- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp +++ b/llvm/lib/CodeGen/RegAllocLinearScan.cpp @@ -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; -- cgit v1.2.3