Avoid emitting a dbg_value machineinstr that's not going to be inserted into entry block.

llvm-svn: 102581
This commit is contained in:
Evan Cheng 2010-04-29 01:23:55 +00:00
parent 17b61785a3
commit 70a0145d7c
2 changed files with 2 additions and 2 deletions

View File

@ -3709,6 +3709,8 @@ SelectionDAGBuilder::EmitFuncArgumentDbgValue(const DbgValueInst &DI,
if (!Reg)
Reg = FuncInfo.ValueMap[V];
if (!Reg)
return;
const TargetInstrInfo *TII = DAG.getTarget().getInstrInfo();
MachineInstrBuilder MIB = BuildMI(MF, getCurDebugLoc(),

View File

@ -222,8 +222,6 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
for (unsigned i = 0, e = FuncInfo->ArgDbgValues.size(); i != e; ++i) {
MachineInstr *MI = FuncInfo->ArgDbgValues[e-i-1];
unsigned Reg = MI->getOperand(0).getReg();
if (!Reg)
continue;
if (TargetRegisterInfo::isPhysicalRegister(Reg))
EntryMBB->insert(EntryMBB->begin(), MI);
else {