[PATCH] D31604: [DebugInfo][X86] Improve X86 Optimize LEAs handling of debug values.
Andrew Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 3 10:57:35 PDT 2017
andrewng added inline comments.
================
Comment at: lib/Target/X86/X86OptimizeLEAs.cpp:544
+// register VReg with an appropriate offset and DIExpression to incorporate the
+// address displacement. Otherwise remove debug value.
+MachineInstr *OptimizeLEAPass::replaceDebugValue(MachineInstr &MI,
----------------
aprantl wrote:
> this comment should go into the header instead.
Do you mean the class definition?
================
Comment at: lib/Target/X86/X86OptimizeLEAs.cpp:555
+ // Can't do this with DWARF version less than 4 as we need support for
+ // DW_OP_stack_value, so remove.
+ MI.eraseFromParent();
----------------
aprantl wrote:
> This is for the backend to decide and discard. We shouldn't have any DWARF version specific code here. (E.g.: what if we generate CodeView debug info?)
>
> After landing https://reviews.llvm.org/D31439, DwarfExpression can actually drop locations that can not be expressed in the requested DWARF version.
OK, so I should just generate the DIExpression with the DW_OP_stack_value operation and the backend will discard the DBG_VALUE if the DWARF version is not compatible (in the case of DWARF debug info)?
https://reviews.llvm.org/D31604
More information about the llvm-commits
mailing list