[all-commits] [llvm/llvm-project] 9811ff: [DebugInfo] Process single-location debug values i...

Stephen Tozer via All-commits all-commits at lists.llvm.org
Fri Sep 15 11:12:43 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9811ffe7d0fcf3b452e06cb4db1e998979b3093d
      https://github.com/llvm/llvm-project/commit/9811ffe7d0fcf3b452e06cb4db1e998979b3093d
  Author: Stephen Tozer <Stephen.Tozer at Sony.com>
  Date:   2023-09-15 (Fri, 15 Sep 2023)

  Changed paths:
    M llvm/include/llvm/IR/DebugInfoMetadata.h
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    M llvm/lib/IR/DebugInfoMetadata.cpp
    A llvm/test/DebugInfo/X86/debug-value-list-entry-value.mir
    M llvm/test/DebugInfo/X86/pr52584.ll

  Log Message:
  -----------
  [DebugInfo] Process single-location debug values in variadic form when producing DWARF

Revision c383f4d6550e enabled using variadic-form debug values to represent
single-location, non-stack-value debug values, and a further patch made all
DBG_INSTR_REFs use variadic form. Not all code paths were updated correctly to
handle the new syntax however, with entry values in still expecting an expression
that begins exactly DW_OP_LLVM_entry_value, 1.

A function already exists to select non-variadic-like expressions; this patch
adds an extra function to cheaply simplify such cases to non-variadic form, which
we use prior to any entry-value processing to put DBG_INSTR_REFs and DBG_VALUEs
down the same code path. We also use it for a few DIExpression functions that
check for whether the first element(s) of a DIExpression match a particular
pattern, so that they will return the same result for
DIExpression(DW_OP_LLVM_arg, 0, <ops>) as for DIExpression(<ops>).

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




More information about the All-commits mailing list