mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-29 13:32:33 +00:00
If value map does not have register for an argument then try to find frame index before giving up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118022 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a90b305af9
commit
8bc9ef77b7
@ -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…
x
Reference in New Issue
Block a user