[all-commits] [llvm/llvm-project] d4ce9e: [DWARF] Revert sharing subprograms across CUs

Jeremy Morse via All-commits all-commits at lists.llvm.org
Mon Aug 9 04:44:18 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d4ce9e463d51b18547dbd181884046abf77c5c91
      https://github.com/llvm/llvm-project/commit/d4ce9e463d51b18547dbd181884046abf77c5c91
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2021-08-09 (Mon, 09 Aug 2021)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
    M llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
    R llvm/test/DebugInfo/AArch64/unretained-declaration-subprogram.ll
    M llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-indirect-param.mir
    M llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-orr-moves.mir
    M llvm/test/DebugInfo/MIR/X86/callsite-stack-value.mir
    M llvm/test/DebugInfo/MIR/X86/debug-call-site-param.mir
    M llvm/test/DebugInfo/X86/convert-loclist.ll
    R llvm/test/DebugInfo/X86/fission-call-site.ll
    R llvm/test/DebugInfo/X86/lto-cross-cu-call-origin-ref.ll
    A llvm/test/DebugInfo/X86/subprogram-across-cus.ll

  Log Message:
  -----------
  [DWARF] Revert sharing subprograms across CUs

This patch is a revert of e08f205f5c2c. In that patch, DW_TAG_subprograms
were permitted to be referenced across CU boundaries, to improve stack
trace construction using call site information. Unfortunately, as
documented in PR48790, the way that subprograms are "owned" by dwarf units
is sufficiently complicated that subprograms end up in unexpected units,
invalidating cross-unit references.

There's no obvious way to easily fix this, and several attempts have
failed. Revert this to ensure correct DWARF is always emitted.

Three tests change in addition to the reversion, but they're all very
light alterations.

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




More information about the All-commits mailing list