[PATCH] D31604: [DebugInfo][X86] Improve X86 Optimize LEAs handling of debug values.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 3 09:08:25 PDT 2017
aprantl added inline comments.
================
Comment at: lib/Target/X86/X86OptimizeLEAs.cpp:267
+ /// \brief Replace debug value.
+ MachineInstr *replaceDebugValue(MachineInstr &MI, unsigned VReg,
----------------
No need to spell out \brief. LLVM uses autobrief in the doxygen settings.
================
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,
----------------
this comment should go into the header instead.
================
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();
----------------
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.
https://reviews.llvm.org/D31604
More information about the llvm-commits
mailing list