[all-commits] [llvm/llvm-project] 40b2eb: [DwarfDebug] Move emission of imported entities fr...
Vladislav Dzhidzhoev via All-commits
all-commits at lists.llvm.org
Wed Jun 14 05:47:13 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 40b2eb62aa727fd79cb3bdf0dc01cd4eab4f430d
https://github.com/llvm/llvm-project/commit/40b2eb62aa727fd79cb3bdf0dc01cd4eab4f430d
Author: Kristina Bessonova <kbessonova at accesssoftek.com>
Date: 2023-06-14 (Wed, 14 Jun 2023)
Changed paths:
M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
M llvm/test/DebugInfo/BPF/extern-void.ll
M llvm/test/DebugInfo/Generic/namespace.ll
M llvm/test/DebugInfo/NVPTX/debug-info.ll
M llvm/test/DebugInfo/X86/gnu-public-names.ll
M llvm/test/DebugInfo/X86/lexical-block-file-inline.ll
Log Message:
-----------
[DwarfDebug] Move emission of imported entities from beginModule() to endModule() (2/7)
RFC https://discourse.llvm.org/t/rfc-dwarfdebug-fix-and-improve-handling-imported-entities-types-and-static-local-in-subprogram-and-lexical-block-scopes/68544
!Note! Extracted from the following patch for review purpose only, should
be squashed with the next patch (D144004) before committing.
Currently the back-end emits imported entities in `DwarfDebug::beginModule()`.
However in case an imported declaration is a function, it must point to an
abstract subprogram if it exists (see PR51501). But in `DwarfDebug::beginModule()`
the DWARF generator doesn't have information to identify if an abstract
subprogram needs to be created.
Only by entering `DwarfDebug::endModule()` all subprograms are processed,
so it's clear which subprogram DIE should be referred to. Hence, the patch moves
the emission there.
The patch is need to fix PR51501, but it only does the preliminary
work. Since it changes the order of debug entities in emitted DWARF and
therefore affect many tests it's separated from the fix for the sake of
simplifying review.
Note that there are other issues with handling an imported declaration in
`DwarfDebug::beginModule()`. They are described in more details in D114705.
Differential Revision: https://reviews.llvm.org/D143985
Depends on D143984
More information about the All-commits
mailing list