[all-commits] [llvm/llvm-project] a5032b: DebugInfo: Don't allow type units to references ty...

David Blaikie via All-commits all-commits at lists.llvm.org
Fri Mar 25 16:49:20 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a5032b26337bc7d877c3ab4e7f18265a3c044df9
      https://github.com/llvm/llvm-project/commit/a5032b26337bc7d877c3ab4e7f18265a3c044df9
  Author: David Blaikie <dblaikie at gmail.com>
  Date:   2022-03-25 (Fri, 25 Mar 2022)

  Changed paths:
    M cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/simplified_template_names.cpp
    M llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
    M llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
    M llvm/test/DebugInfo/X86/addr-tu-to-non-tu.ll
    M llvm/test/DebugInfo/X86/tu-to-non-tu.ll

  Log Message:
  -----------
  DebugInfo: Don't allow type units to references types in the CU

We could only do this in limited ways (since we emit the TUs first, we
can't use ref_addr (& we can't use that in Split DWARF either) - so we
had to synthesize declarations into the TUs) and they were ambiguous in
some cases (if the CU type had internal linkage, parsing the TU would
require knowing which CU was referencing the TU to know which type the
declaration was for, which seems not-ideal). So to avoid all that, let's
just not reference types defined in the CU from TUs - instead moving the
TU type into the CU (recursively).

This does increase debug info size (by pulling more things out of type
units, into the compile unit) - about 2% of uncompressed dwp file size
for clang -O0 -g -gsplit-dwarf. (5% .debug_info.dwo section size
increase in the .dwp)




More information about the All-commits mailing list