[PATCH] D48277: [DebugInfo] Keep DBG_VALUE undef in LiveDebugVariables

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 18 05:27:24 PDT 2018


uabelho created this revision.
uabelho added a reviewer: aprantl.
Herald added a subscriber: JDevlieghere.

[DebugInfo] Keep DBG_VALUE undef in LiveDebugVariables

Fixes PR36579.

For cases where we had e.g.

DBG_VALUE 42
 [...]
 DBG_VALUE undef

LiveDebugVariables would discard all undef DBG_VALUEs and then it would
look like the variable had the value 42 throughout the rest of the
function, which is incorrect.

With this patch we don't remove all undef DBG_VALUEs in LiveDebugVariables
so they will be kept after register allocation just like other DBG_VALUEs
which will yield more correct debug information.


https://reviews.llvm.org/D48277

Files:
  lib/CodeGen/LiveDebugVariables.cpp
  test/DebugInfo/X86/live-debug-vars-discard-invalid.mir
  test/DebugInfo/X86/live-debug-vars-keep-undef.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48277.151694.patch
Type: text/x-patch
Size: 5348 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180618/846b0bbc/attachment.bin>


More information about the llvm-commits mailing list