[all-commits] [llvm/llvm-project] f3dc35: [MC] output inlined-at debug info (#106230)

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Thu Mar 6 19:47:33 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f3dc358953a13caf7521fc615a08f6317930351c
      https://github.com/llvm/llvm-project/commit/f3dc358953a13caf7521fc615a08f6317930351c
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2025-03-06 (Thu, 06 Mar 2025)

  Changed paths:
    M llvm/include/llvm/MC/MCObjectStreamer.h
    M llvm/include/llvm/MC/MCStreamer.h
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
    M llvm/lib/MC/MCAsmStreamer.cpp
    M llvm/lib/MC/MCObjectStreamer.cpp
    M llvm/lib/MC/MCStreamer.cpp
    A llvm/test/CodeGen/AMDGPU/dbg-info-inline-at.ll
    M llvm/test/CodeGen/XCore/dwarf_debug.ll
    M llvm/test/DebugInfo/X86/inline-seldag-test.ll

  Log Message:
  -----------
  [MC] output inlined-at debug info (#106230)

Currently MC print source location of instructions in comments in
assembly when debug info is available, however, it does not include
inlined-at locations when a function is inlined.

For example, function foo is defined in header file a.h and is called
multiple times in b.cpp. If foo is inlined, current assembly will only
show its instructions with their line numbers in a.h. With inlined-at
locations, the assembly will also show where foo is called in b.cpp.

This patch adds inlined-at locations to the comments by using
DebugLoc::print. It makes the printed source location info consistent
with those printed by machine passes.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list