mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Re-enable 102565 with fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102602 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3707,15 +3707,17 @@ SelectionDAGBuilder::EmitFuncArgumentDbgValue(const DbgValueInst &DI,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Reg)
|
if (!Reg) {
|
||||||
Reg = FuncInfo.ValueMap[V];
|
DenseMap<const Value *, unsigned>::iterator VMI = FuncInfo.ValueMap.find(V);
|
||||||
if (!Reg)
|
if (VMI == FuncInfo.ValueMap.end())
|
||||||
return false;
|
return false;
|
||||||
|
Reg = VMI->second;
|
||||||
|
}
|
||||||
|
|
||||||
const TargetInstrInfo *TII = DAG.getTarget().getInstrInfo();
|
const TargetInstrInfo *TII = DAG.getTarget().getInstrInfo();
|
||||||
MachineInstrBuilder MIB = BuildMI(MF, getCurDebugLoc(),
|
MachineInstrBuilder MIB = BuildMI(MF, getCurDebugLoc(),
|
||||||
TII->get(TargetOpcode::DBG_VALUE))
|
TII->get(TargetOpcode::DBG_VALUE))
|
||||||
.addReg(Reg).addImm(Offset).addMetadata(Variable);
|
.addReg(Reg, RegState::Debug).addImm(Offset).addMetadata(Variable);
|
||||||
FuncInfo.ArgDbgValues.push_back(&*MIB);
|
FuncInfo.ArgDbgValues.push_back(&*MIB);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -3896,15 +3898,11 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
|
|||||||
} else {
|
} else {
|
||||||
SDValue &N = NodeMap[V];
|
SDValue &N = NodeMap[V];
|
||||||
if (N.getNode()) {
|
if (N.getNode()) {
|
||||||
#if 0
|
|
||||||
if (!EmitFuncArgumentDbgValue(DI, V, Variable, Offset, N)) {
|
if (!EmitFuncArgumentDbgValue(DI, V, Variable, Offset, N)) {
|
||||||
#endif
|
|
||||||
SDV = DAG.getDbgValue(Variable, N.getNode(),
|
SDV = DAG.getDbgValue(Variable, N.getNode(),
|
||||||
N.getResNo(), Offset, dl, SDNodeOrder);
|
N.getResNo(), Offset, dl, SDNodeOrder);
|
||||||
DAG.AddDbgValue(SDV, N.getNode(), false);
|
DAG.AddDbgValue(SDV, N.getNode(), false);
|
||||||
#if 0
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
// We may expand this to cover more cases. One case where we have no
|
// We may expand this to cover more cases. One case where we have no
|
||||||
// data available is an unreferenced parameter; we need this fallback.
|
// data available is an unreferenced parameter; we need this fallback.
|
||||||
|
@@ -212,15 +212,12 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
|
|||||||
|
|
||||||
SelectAllBasicBlocks(Fn);
|
SelectAllBasicBlocks(Fn);
|
||||||
|
|
||||||
FuncInfo->clear();
|
// If the first basic block in the function has live ins that need to be
|
||||||
|
|
||||||
// If the first basic block in the function has live ins that need to be
|
|
||||||
// copied into vregs, emit the copies into the top of the block before
|
// copied into vregs, emit the copies into the top of the block before
|
||||||
// emitting the code for the block.
|
// emitting the code for the block.
|
||||||
MachineBasicBlock *EntryMBB = MF->begin();
|
MachineBasicBlock *EntryMBB = MF->begin();
|
||||||
RegInfo->EmitLiveInCopies(EntryMBB, TRI, TII);
|
RegInfo->EmitLiveInCopies(EntryMBB, TRI, TII);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// Insert DBG_VALUE instructions for function arguments to the entry block.
|
// Insert DBG_VALUE instructions for function arguments to the entry block.
|
||||||
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];
|
||||||
@@ -237,7 +234,6 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
|
|||||||
// Release function-specific state. SDB and CurDAG are already cleared
|
// Release function-specific state. SDB and CurDAG are already cleared
|
||||||
// at this point.
|
// at this point.
|
||||||
FuncInfo->clear();
|
FuncInfo->clear();
|
||||||
#endif
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user