[all-commits] [llvm/llvm-project] 7f2f82: Revert sharing subprograms across CUs

Jeremy Morse via All-commits all-commits at lists.llvm.org
Mon Aug 23 11:19:21 PDT 2021


  Branch: refs/heads/release/13.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 7f2f829479dcb4254149670cc3b16f89a85127bb
      https://github.com/llvm/llvm-project/commit/7f2f829479dcb4254149670cc3b16f89a85127bb
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2021-08-23 (Mon, 23 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:
  -----------
  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

(cherry picked from commit d4ce9e463d51b18547dbd181884046abf77c5c91)
Signed-off-by: Jeremy Morse <jeremy.morse at sony.com>

Conflicts:
	llvm/test/DebugInfo/X86/convert-loclist.ll




More information about the All-commits mailing list