[PATCH] D37911: [DebugInfo] Insert DW_OP_deref when spilling indirect DBG_VALUEs

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 11:10:28 PDT 2017


rnk created this revision.
Herald added subscribers: hiraditya, qcolombet.

This comes up in optimized debug info for C++ programs that pass and
return objects indirectly by address. In these programs,
llvm.dbg.declare survives optimization, which causes us to emit indirect
DBG_VALUE instructions. The fast register allocator knows to insert
DW_OP_deref when spilling indirect DBG_VALUE instructions, but the
LiveDebugVariables did not until this change.

This fixes part of PR34513. I need to look into why this doesn't work at
-O0 and I'll send follow up patches to handle that.


https://reviews.llvm.org/D37911

Files:
  llvm/lib/CodeGen/LiveDebugVariables.cpp
  llvm/test/DebugInfo/X86/bbjoin.ll
  llvm/test/DebugInfo/X86/spill-indirect-nrvo.ll
  llvm/test/DebugInfo/X86/spill-nontrivial-param.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37911.115428.patch
Type: text/x-patch
Size: 19019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170915/b90f4d46/attachment.bin>


More information about the llvm-commits mailing list