[PATCH] D144007: [DwarfDebug] Move emission of globals from beginModule() to endModule() (6/7)

Kristina Bessonova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 17 06:35:26 PST 2023


krisb created this revision.
Herald added subscribers: kosarev, mattd, gchakrabarti, pmatos, asb, asavonic, kerbowa, mgrang, hiraditya, jgravelle-google, sbc100, jvesely, nemanjai, dschuff.
Herald added a project: All.
krisb edited the summary of this revision.
krisb added reviewers: dblaikie, jmmartinez.
krisb added projects: LLVM, debug-info.
Herald added a subscriber: ormris.
krisb published this revision for review.
Herald added subscribers: llvm-commits, aheejin, jholewinski.

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

This patch moves the emission of global variables from `DwarfDebug::beginModule()`
to `DwarfDebug::endModule()`. Effectively, this changes nothing but the order
of debug entities in the resulting DWARF.

This is needed to simplify DWARF emission in a context of proper support of
function-local static variables (which are globals in terms of LLVM IR)
which comes in the next patch (D144008 <https://reviews.llvm.org/D144008>), making all the globals handled in
a single place, together with other global and local entities.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144007

Files:
  lld/test/wasm/debuginfo.test
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/test/DebugInfo/AMDGPU/variable-locations.ll
  llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll
  llvm/test/DebugInfo/Generic/debug-names-linkage-name.ll
  llvm/test/DebugInfo/Generic/namespace.ll
  llvm/test/DebugInfo/NVPTX/debug-addr-class.ll
  llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll
  llvm/test/DebugInfo/PowerPC/strict-dwarf.ll
  llvm/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll
  llvm/test/DebugInfo/X86/DW_AT_calling-convention.ll
  llvm/test/DebugInfo/X86/align_cpp11.ll
  llvm/test/DebugInfo/X86/align_objc.ll
  llvm/test/DebugInfo/X86/arange-and-stub.ll
  llvm/test/DebugInfo/X86/containing-type-extension-rust.ll
  llvm/test/DebugInfo/X86/debug-info-access.ll
  llvm/test/DebugInfo/X86/debug-info-static-member.ll
  llvm/test/DebugInfo/X86/debug-loc-offset.mir
  llvm/test/DebugInfo/X86/dwarf-aranges.ll
  llvm/test/DebugInfo/X86/dwarf-linkage-names.ll
  llvm/test/DebugInfo/X86/dwarfdump-DIImportedEntity_elements.ll
  llvm/test/DebugInfo/X86/generate-odr-hash.ll
  llvm/test/DebugInfo/X86/gnu-public-names.ll
  llvm/test/DebugInfo/X86/linkage-name.ll
  llvm/test/DebugInfo/X86/namelist1.ll
  llvm/test/DebugInfo/X86/prototyped.ll
  llvm/test/DebugInfo/X86/subprogram-across-cus.ll
  llvm/test/DebugInfo/X86/template.ll
  llvm/test/DebugInfo/X86/tls.ll
  llvm/test/DebugInfo/X86/tu-to-non-tu.ll
  llvm/test/DebugInfo/X86/vla-global.ll
  llvm/test/DebugInfo/attr-btf_tag.ll
  llvm/test/MC/WebAssembly/debug-info.ll
  llvm/test/MC/WebAssembly/debug-info64.ll
  llvm/test/MC/WebAssembly/dwarfdump.ll
  llvm/test/MC/WebAssembly/dwarfdump64.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144007.497302.patch
Type: text/x-patch
Size: 89901 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230217/81933c72/attachment-0001.bin>


More information about the llvm-commits mailing list