mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-08 04:11:27 +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) {
|
||||
// Check if ValueMap has reg number.
|
||||
DenseMap<const Value *, unsigned>::iterator VMI = FuncInfo.ValueMap.find(V);
|
||||
if (VMI == FuncInfo.ValueMap.end())
|
||||
return false;
|
||||
Reg = VMI->second;
|
||||
if (VMI != FuncInfo.ValueMap.end())
|
||||
Reg = VMI->second;
|
||||
}
|
||||
|
||||
if (!Reg && N.getNode())
|
||||
|
||||
if (!Reg && N.getNode()) {
|
||||
// Check if frame index is available.
|
||||
if (LoadSDNode *LNode = dyn_cast<LoadSDNode>(N.getNode()))
|
||||
if (FrameIndexSDNode *FINode =
|
||||
@ -3993,6 +3992,10 @@ SelectionDAGBuilder::EmitFuncArgumentDbgValue(const Value *V, MDNode *Variable,
|
||||
Reg = TRI->getFrameRegister(MF);
|
||||
Offset = FINode->getIndex();
|
||||
}
|
||||
}
|
||||
|
||||
if (!Reg)
|
||||
return false;
|
||||
|
||||
MachineInstrBuilder MIB = BuildMI(MF, getCurDebugLoc(),
|
||||
TII->get(TargetOpcode::DBG_VALUE))
|
||||
|
Loading…
Reference in New Issue
Block a user