Skip to content

Consider using AssignmentTracking / dbg_assign #139623

Open
@nikic

Description

@nikic

LLVM 16 introduced a new dbg_assign mechanism for representing debug info, that promises more accurate results, see:
https://llvm.org/docs/AssignmentTracking.html
https://discourse.llvm.org/t/rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir/62367

If I understand correctly, this can be enabled by scheduling an additional pass, without having to change the debug emission in the frontend: https://github.com/llvm/llvm-project/blob/7d32d72f10445657f598cbdf1bb5f3040373daf5/clang/lib/CodeGen/BackendUtil.cpp#L937-L947

We should consider whether we want to make use of this. Clang uses it for optimized, non-LTO builds by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions