Debug Info: Simplify Frame Index handling in DBG_VALUE Machine Instructions
Rather than using the full power of target-specific addressing modes in DBG_VALUEs with Frame Indicies, simply use Frame Index + Offset. This reduces the complexity of debug info handling down to two representations of values (reg+offset and frame index+offset) rather than three or four. Ideally we could ensure that frame indicies had been eliminated by the time we reached an assembly or dwarf generation, but I haven't spent the time to figure out where the FIs are leaking through into that & whether there's a good place to convert them. Some FI+offset=>reg+offset conversion is done (see PrologEpilogInserter, for example) which is necessary for some SelectionDAG assumptions about registers, I believe, but it might be possible to make this a more thorough conversion & ensure there are no remaining FIs no matter how instruction selection is performed. llvm-svn: 184066
This commit is contained in:
@@ -921,17 +921,6 @@ void UserValue::insertDebugValue(MachineBasicBlock *MBB, SlotIndex Idx,
|
||||
MachineOperand &Loc = locations[LocNo];
|
||||
++NumInsertedDebugValues;
|
||||
|
||||
// Frame index locations may require a target callback.
|
||||
if (Loc.isFI()) {
|
||||
MachineInstr *MI = TII.emitFrameIndexDebugValue(*MBB->getParent(),
|
||||
Loc.getIndex(), offset, variable,
|
||||
findDebugLoc());
|
||||
if (MI) {
|
||||
MBB->insert(I, MI);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// This is not a frame index, or the target is happy with a standard FI.
|
||||
BuildMI(*MBB, I, findDebugLoc(), TII.get(TargetOpcode::DBG_VALUE))
|
||||
.addOperand(Loc).addImm(offset).addMetadata(variable);
|
||||
}
|
||||
@@ -992,4 +981,3 @@ void LiveDebugVariables::dump() {
|
||||
static_cast<LDVImpl*>(pImpl)->print(dbgs());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user