mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-08 20:30:50 +00:00
If value map does not have register for an argument then try to find frame index before giving up.
llvm-svn: 118022
This commit is contained in:
parent
efd9ac540a
commit
e3575ef54f
@ -3980,12 +3980,11 @@ SelectionDAGBuilder::EmitFuncArgumentDbgValue(const Value *V, MDNode *Variable,
|
|||||||
if (!Reg) {
|
if (!Reg) {
|
||||||
// Check if ValueMap has reg number.
|
// Check if ValueMap has reg number.
|
||||||
DenseMap<const Value *, unsigned>::iterator VMI = FuncInfo.ValueMap.find(V);
|
DenseMap<const Value *, unsigned>::iterator VMI = FuncInfo.ValueMap.find(V);
|
||||||
if (VMI == FuncInfo.ValueMap.end())
|
if (VMI != FuncInfo.ValueMap.end())
|
||||||
return false;
|
Reg = VMI->second;
|
||||||
Reg = VMI->second;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Reg && N.getNode())
|
if (!Reg && N.getNode()) {
|
||||||
// Check if frame index is available.
|
// Check if frame index is available.
|
||||||
if (LoadSDNode *LNode = dyn_cast<LoadSDNode>(N.getNode()))
|
if (LoadSDNode *LNode = dyn_cast<LoadSDNode>(N.getNode()))
|
||||||
if (FrameIndexSDNode *FINode =
|
if (FrameIndexSDNode *FINode =
|
||||||
@ -3993,6 +3992,10 @@ SelectionDAGBuilder::EmitFuncArgumentDbgValue(const Value *V, MDNode *Variable,
|
|||||||
Reg = TRI->getFrameRegister(MF);
|
Reg = TRI->getFrameRegister(MF);
|
||||||
Offset = FINode->getIndex();
|
Offset = FINode->getIndex();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Reg)
|
||||||
|
return false;
|
||||||
|
|
||||||
MachineInstrBuilder MIB = BuildMI(MF, getCurDebugLoc(),
|
MachineInstrBuilder MIB = BuildMI(MF, getCurDebugLoc(),
|
||||||
TII->get(TargetOpcode::DBG_VALUE))
|
TII->get(TargetOpcode::DBG_VALUE))
|
||||||
|
Loading…
Reference in New Issue
Block a user