[all-commits] [llvm/llvm-project] ff574f: [DebugInfo][NFC] Move out lambdas from collectCall...

David via All-commits all-commits at lists.llvm.org
Thu Feb 27 02:19:20 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ff574ff291e73b78164aade9d456d364bbf93a03
      https://github.com/llvm/llvm-project/commit/ff574ff291e73b78164aade9d456d364bbf93a03
  Author: David Stenberg <david.stenberg at ericsson.com>
  Date:   2020-02-27 (Thu, 27 Feb 2020)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

  Log Message:
  -----------
  [DebugInfo][NFC] Move out lambdas from collectCallSiteParameters()

Summary:
This is a preparatory patch for D75036, in which a debug expression is
associated with each parameter register in the worklist. In that patch
the two lambda functions addToWorklist() and finishCallSiteParams() grow
a bit, so move those out to separate functions. This patch also prepares
for each parameter register having their own expression moving the
creation of the DbgValueLoc into finishCallSiteParams().

Reviewers: djtodoro, vsk

Reviewed By: djtodoro, vsk

Subscribers: hiraditya, llvm-commits

Tags: #debug-info, #llvm

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


  Commit: 6d857166d218ccedfff3b177a4489420e3bdd603
      https://github.com/llvm/llvm-project/commit/6d857166d218ccedfff3b177a4489420e3bdd603
  Author: David Stenberg <david.stenberg at ericsson.com>
  Date:   2020-02-27 (Thu, 27 Feb 2020)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    A llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-expr-chain.mir
    A llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-expr-entry-value.mir

  Log Message:
  -----------
  [DebugInfo] Describe call site values for chains of expression producing instrs

Summary:
If the describeLoadedValue() hook produced a DIExpression when
describing a instruction, and it was not possible to emit a call site
entry directly (the value operand was not an immediate nor a preserved
register), then that described value could not be inserted into the
worklist, and would instead be dropped, meaning that the parameter's
call site value couldn't be described.

This patch extends the worklist so that each entry has an DIExpression
that is built up when iterating through the instructions.

This allows us to describe instruction chains like this:

  $reg0 = mv $fp
  $reg0 = add $reg0, offset
  call @call_with_offseted_fp

Since DW_OP_LLVM_entry_value operations can't be combined with any other
expression, such call site entries will not be emitted. I have added a
test, dbgcall-site-expr-entry-value.mir, which verifies that we don't
assert or emit broken DWARF in such cases.

Reviewers: djtodoro, aprantl, vsk

Reviewed By: djtodoro, vsk

Subscribers: hiraditya, llvm-commits

Tags: #debug-info, #llvm

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


Compare: https://github.com/llvm/llvm-project/compare/2affdcee615f...6d857166d218


More information about the All-commits mailing list