[llvm] [RFC] Emit dwarf data for signature-changed or new functions (PR #157349)

Vladislav Dzhidzhoev via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 22 04:58:32 PDT 2025


dzhidzhoev wrote:

> The parent tag of above DW_TAG_inlined_subroutine is
> DW_TAG_compile_unit. This is a new feature for dwarf
> so it won't cause issues with existing dwarf related tools.

Was usage of trampolines in DWARF considered? As it is stated in section 3.3.9 of DWARF standard (https://dwarfstd.org/doc/DWARF5.pdf):
```
A trampoline is a compiler-generated subroutine that serves as an intermediary in
making a call to another subroutine. It may adjust parameters and/or the result (if any)
as appropriate to the combined calling and called execution contexts.
```

Can DW_TAG_subprograms with DW_AT_trampoline solve the purpose, for which DW_TAG_inlined_subroutines are created in this patch? DwarfDebug can already produce subprogram DIEs with DW_AT_trampoline, and LLVM IR of `llvm/test/DebugInfo/X86/disubprogram-trampoline.ll` is similar to what we're trying to solve in the sense that a function like "func.suffix" (sub1_.t0p in the test) should refer to the original "func" in DWARF.

https://github.com/llvm/llvm-project/pull/157349


More information about the llvm-commits mailing list