diff --git a/llvm/lib/CodeGen/CalcSpillWeights.cpp b/llvm/lib/CodeGen/CalcSpillWeights.cpp --- a/llvm/lib/CodeGen/CalcSpillWeights.cpp +++ b/llvm/lib/CodeGen/CalcSpillWeights.cpp @@ -203,8 +203,8 @@ }; std::set CopyHints; - for (MachineRegisterInfo::reg_instr_iterator - I = mri.reg_instr_begin(li.reg), E = mri.reg_instr_end(); + for (MachineRegisterInfo::reg_instr_nodbg_iterator + I = mri.reg_instr_nodbg_begin(li.reg), E = mri.reg_instr_nodbg_end(); I != E; ) { MachineInstr *mi = &*(I++); @@ -215,7 +215,7 @@ continue; numInstr++; - if (mi->isIdentityCopy() || mi->isImplicitDef() || mi->isDebugInstr()) + if (mi->isIdentityCopy() || mi->isImplicitDef()) continue; if (!visited.insert(mi).second) continue;