[LLVMdev] Expected behavior of eliminateFrameIndex() on dbg_value machine instructions
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Oct 10 13:19:50 CDT 2011
On Oct 10, 2011, at 10:26 AM, Richard Osborne wrote:
> I'm investigating a bug associated with debug information that manifests
> itself in the XCore backend (PR11105). I'd like to understand what the
> expected behavior of eliminateFrameIndex() is when it is called on a
> dbg_value machine instruction.
That is up to the target.
The TII::emitFrameIndexDebugValue() hook is called to insert DBG_VALUE instructions referring to values on the stack.
The target's eliminateFrameIndex() should be able to handle any DBG_VALUE instructions created by this hook.
If you don't implement the hook, you will get DBG_VALUE instructions with just a FrameIndex operand followed by the mandatory Offset and Metadata operands.
More information about the LLVMdev