[llvm] [LLVM][DWARF] Add support for monolithic types in .debug_names (PR #68131)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 5 11:58:36 PDT 2023


================
@@ -3514,11 +3520,15 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
       return;
     }
 
-    // If the type wasn't dependent on fission addresses, finish adding the type
-    // and all its dependent types.
     for (auto &TU : TypeUnitsToAdd) {
       InfoHolder.computeSizeAndOffsetsForUnit(TU.first.get());
       InfoHolder.emitUnit(TU.first.get(), useSplitDwarf());
+      if (getDwarfVersion() >= 5 &&
+          getAccelTableKind() == AccelTableKind::Dwarf) {
+        addTypeUnit(std::move(TU.first));
----------------
dwblaikie wrote:

> I have not. Were you thinking for one invocation of clang, or to build whole project?
> What do you think a reasonable number of type units pre compilation modules are?

Given I expect this to be a fairly clear non-starter, I'd probably test something pretty simple like, say, Clang's Sema.cpp - it's a bit of a big/rough thing to compile, probably has enough types to show up a significant regression I'd expect would be caused by keeping all the TUs alive to the end of the compilation.

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


More information about the llvm-commits mailing list