[PATCH] D69889: [DebugInfo] Avoid creating entry values for clobbered registers

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 05:58:34 PST 2019


dstenb created this revision.
dstenb added reviewers: djtodoro, NikolaPrica, aprantl, vsk.
dstenb added a project: debug-info.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Entry values are considered for parameters that have register-described
DBG_VALUEs in the entry block (along with other conditions).

If a parameter's value has been propagated from the caller to the
callee, then the parameter's DBG_VALUE in the entry block may be
described using a register defined by some instruction, and entry values
should not be emitted for the parameter, which can currently occur.
One such case was seen in the attached test case, in which the second
parameter, which is described by a redefinition of the first parameter's
register, would incorrectly get an entry value using the first
parameter's register. This commit intends to solve such cases by keeping
track of register defines, and ignoring DBG_VALUEs in the entry block
that are described by such registers.

In a RelWithDebInfo build of clang-8, the average size of the set was
27, and in a RelWithDebInfo+ASan build it was 30.


Repository:
  rL LLVM

https://reviews.llvm.org/D69889

Files:
  llvm/lib/CodeGen/LiveDebugValues.cpp
  llvm/test/DebugInfo/MIR/ARM/dbgcall-site-propagated-value.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69889.228048.patch
Type: text/x-patch
Size: 9681 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191106/889f0df2/attachment.bin>


More information about the llvm-commits mailing list