From: Jim Grosbach Date: Fri, 4 Jun 2010 20:18:30 +0000 (+0000) Subject: Skip dbg_value instructions when scanning instructions in register scavenging. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1c8ab781d5b24bc473b4baa8f3fb6e9b55597aa3;p=oota-llvm.git Skip dbg_value instructions when scanning instructions in register scavenging. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105481 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/RegisterScavenging.cpp b/lib/CodeGen/RegisterScavenging.cpp index 690e59f96eb..b3e79756b62 100644 --- a/lib/CodeGen/RegisterScavenging.cpp +++ b/lib/CodeGen/RegisterScavenging.cpp @@ -258,6 +258,10 @@ unsigned RegScavenger::findSurvivorReg(MachineBasicBlock::iterator StartMI, bool inVirtLiveRange = false; for (++MI; InstrLimit > 0 && MI != ME; ++MI, --InstrLimit) { + if (MI->isDebugValue()) { + ++InstrLimit; // Don't count debug instructions + continue; + } bool isVirtKillInsn = false; bool isVirtDefInsn = false; // Remove any candidates touched by instruction.