forked from OSchip/llvm-project
Avoid emitting a dbg_value machineinstr that's not going to be inserted into entry block.
llvm-svn: 102581
This commit is contained in:
parent
17b61785a3
commit
70a0145d7c
|
@ -3709,6 +3709,8 @@ SelectionDAGBuilder::EmitFuncArgumentDbgValue(const DbgValueInst &DI,
|
||||||
|
|
||||||
if (!Reg)
|
if (!Reg)
|
||||||
Reg = FuncInfo.ValueMap[V];
|
Reg = FuncInfo.ValueMap[V];
|
||||||
|
if (!Reg)
|
||||||
|
return;
|
||||||
|
|
||||||
const TargetInstrInfo *TII = DAG.getTarget().getInstrInfo();
|
const TargetInstrInfo *TII = DAG.getTarget().getInstrInfo();
|
||||||
MachineInstrBuilder MIB = BuildMI(MF, getCurDebugLoc(),
|
MachineInstrBuilder MIB = BuildMI(MF, getCurDebugLoc(),
|
||||||
|
|
|
@ -222,8 +222,6 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
|
||||||
for (unsigned i = 0, e = FuncInfo->ArgDbgValues.size(); i != e; ++i) {
|
for (unsigned i = 0, e = FuncInfo->ArgDbgValues.size(); i != e; ++i) {
|
||||||
MachineInstr *MI = FuncInfo->ArgDbgValues[e-i-1];
|
MachineInstr *MI = FuncInfo->ArgDbgValues[e-i-1];
|
||||||
unsigned Reg = MI->getOperand(0).getReg();
|
unsigned Reg = MI->getOperand(0).getReg();
|
||||||
if (!Reg)
|
|
||||||
continue;
|
|
||||||
if (TargetRegisterInfo::isPhysicalRegister(Reg))
|
if (TargetRegisterInfo::isPhysicalRegister(Reg))
|
||||||
EntryMBB->insert(EntryMBB->begin(), MI);
|
EntryMBB->insert(EntryMBB->begin(), MI);
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue