[all-commits] [llvm/llvm-project] 4fec44: [DebugInfo] Add helper for finding entry value can...

David via All-commits all-commits at lists.llvm.org
Wed Nov 13 02:11:18 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4fec44cd61517cda16f94067a34982628bda34f7
      https://github.com/llvm/llvm-project/commit/4fec44cd61517cda16f94067a34982628bda34f7
  Author: David Stenberg <david.stenberg at ericsson.com>
  Date:   2019-11-13 (Wed, 13 Nov 2019)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues.cpp

  Log Message:
  -----------
  [DebugInfo] Add helper for finding entry value candidates [NFC]

Summary:
The conditions that are used to determine if entry values should be
emitted for a parameter are quite many, and will grow slightly
in a follow-up commit, so move those to a helper function, as was
suggested in the code review for D69889.

Reviewers: djtodoro, NikolaPrica

Reviewed By: djtodoro

Subscribers: probinson, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69955


  Commit: 5e646ff53052c5d8694f2da14b9a094202fee729
      https://github.com/llvm/llvm-project/commit/5e646ff53052c5d8694f2da14b9a094202fee729
  Author: David Stenberg <david.stenberg at ericsson.com>
  Date:   2019-11-13 (Wed, 13 Nov 2019)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues.cpp
    A llvm/test/DebugInfo/MIR/ARM/dbgcall-site-propagated-value.mir

  Log Message:
  -----------
  [DebugInfo] Avoid creating entry values for clobbered registers

Summary:
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.

Reviewers: djtodoro, NikolaPrica, aprantl, vsk

Reviewed By: djtodoro, vsk

Subscribers: hiraditya, llvm-commits

Tags: #debug-info, #llvm

Differential Revision: https://reviews.llvm.org/D69889


Compare: https://github.com/llvm/llvm-project/compare/3367686b4d12...5e646ff53052


More information about the All-commits mailing list