[all-commits] [llvm/llvm-project] 087172: [DebugInfo][RemoveDIs] Handle non-instr debug-info...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Tue Jan 23 07:07:42 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 087172258a50d5bcabe43aff072a20701f0808ef
      https://github.com/llvm/llvm-project/commit/087172258a50d5bcabe43aff072a20701f0808ef
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2024-01-23 (Tue, 23 Jan 2024)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
    M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/combine-shift-of-shifted-dbg-value-fallback.ll
    M llvm/test/CodeGen/AArch64/GlobalISel/debug-cpp.ll
    M llvm/test/CodeGen/AArch64/GlobalISel/debug-insts.ll
    M llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-dilocation.ll
    M llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-extract-used-by-dbg.ll
    M llvm/test/CodeGen/X86/GlobalISel/x86-calllowering-dbg-trunc.ll

  Log Message:
  -----------
  [DebugInfo][RemoveDIs] Handle non-instr debug-info in GlobalISel (#75228)

The RemoveDIs project is aiming to eliminate debug intrinsics like
dbg.value and dbg.declare from LLVM, and replace them with DPValue objects
attached to instructions. ISel is one of the "terminals" where that
information needs to be converted into MIR format: this patch implements
support for that in GlobalISel. We aim for the output of LLVM to be
identical with/without RemoveDIs debug-info.

This patch should be NFC, as we're handling the same data about variables
stored in a different format -- it now appears in a DPValue object rather
than as an intrinsic. To that end, I've refactored the handling of
dbg.values into a dedicated function, and call it whenever a dbg.value or a
DPValue is encountered. dbg.declare is handled in a similar way.

Testing: adding the --try-experimental-debuginfo-iterators switch to llc
causes it to try and convert to the "new" debug-info format if it's built
in (LLVM_EXPERIMENTAL_DEBUGINFO_ITERATORS=On), and it'll be covered by our
buildbot. One test has a few extra wildcard-regexes added: this is because
there's some extra data printed about attached debug-info, which is safe to
ignore.




More information about the All-commits mailing list