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

Vladislav Dzhidzhoev via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 24 00:48:30 PDT 2025


dzhidzhoev wrote:

> But if the function is optimzied (e.g., argument promotion, dead argument/return value elimination, etc), things become difficult. In such case, we have _only one_ function. If we try to create two Subprogram, only one of them can be attached to the function, and the other Subprogram will not show up in eventual dwarf since there is no references in the code for this other Subprogram.

This is not true in general. Here's the example when we have one LLVM IR function, but multiple DW_TAG_subprograms: https://godbolt.org/z/dh3jxMf1f. Would DWARF similar to that solve the initial problem for this example, if we imagine that function "mul2" is "mul" after some pass like argument promotion?

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


More information about the llvm-commits mailing list