summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-04-11 17:55:47 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-04-11 17:55:47 +0000
commit305d268ac3de3513a38ae9de7099ee3c0d74f6a3 (patch)
tree07c9b687646b1e7422d7ce446abbf55367baafbd
parent33281864c1492e85dd5e1148c04ef2d1e5d22137 (diff)
downloadbcm5719-llvm-305d268ac3de3513a38ae9de7099ee3c0d74f6a3.tar.gz
bcm5719-llvm-305d268ac3de3513a38ae9de7099ee3c0d74f6a3.zip
Do not add empty live intervals to handled_. They should never be undone for backtracking.
llvm-svn: 49544
-rw-r--r--llvm/lib/CodeGen/RegAllocLinearScan.cpp3
1 files changed, 1 insertions, 2 deletions
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;
OpenPOWER on IntegriCloud