[all-commits] [llvm/llvm-project] 86f528: [LiveDebugValues] Cleanup Transfers when removing ...

Djordje Todorovic via All-commits all-commits at lists.llvm.org
Mon Aug 30 05:17:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 86f5288eae4a27fd2f497ac45ad087d643ad73a8
      https://github.com/llvm/llvm-project/commit/86f5288eae4a27fd2f497ac45ad087d643ad73a8
  Author: Djordje Todorovic <djordje.todorovic at syrmia.com>
  Date:   2021-08-30 (Mon, 30 Aug 2021)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
    A llvm/test/DebugInfo/MIR/X86/backup-entry-values-usage.mir
    M llvm/test/DebugInfo/MIR/X86/dbgcall-site-reference.mir
    M llvm/test/DebugInfo/MIR/X86/entry-value-of-modified-param.mir
    A llvm/test/DebugInfo/MIR/X86/remove-entry-value-from-loop.mir

  Log Message:
  -----------
  [LiveDebugValues] Cleanup Transfers when removing Entry Value

If we encounter a new debug value, describing the same parameter,
we should stop tracking the parameter's Entry Value. At that point,
in some cases, the Transfer which uses the parameter's Entry Value,
is already emitted. Thanks to the RemoveRedundantDebugValues pass,
many problems with incorrect instruction order and number of DBG_VALUEs
are fixed. However, we still cannot rely on the rule that each new
debug value is set by the previous non-debug instruction in Machine
Basic Block.

When new parameter debug value triggers removal of Backup Entry Value
for the same parameter, do the cleanup of Transfers emitted from Backup
Entry Values. Get the Transfer Instruction which created the new debug
value and search for debug values already emitted from the to-be-deleted
Backup Entry Value and attached to the Transfer Instruction. If found,
delete the Transfer and remove "primary" Entry Value Var Loc from
OpenRanges.

This patch fixes PR47628.

Patch by Nikola Tesic.

Differential revision: https://reviews.llvm.org/D106856




More information about the All-commits mailing list