[PATCH] D96035: [WIP][dsymutil][DWARFlinker] implement separate multi-thread processing for compile units.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 05:37:59 PST 2021


avl added a comment.

> One idea is for each type we want to unique, each CU as it is being parsed on its own thread creates a type map that maps "type compile unit path" (which is DW_AT_decl_file of that type) to a list of uniqued types with decl context info. This would allow all types with the same DW_AT_decl_file to be stored in the same type compile unit. As we emit the debug info for a normal compile unit, any type references are changed to be DW_AT_ref_addr references with values that will need to be fixed up. After all normal CUs have been emitted, combine all of the CU specific type maps together, and now emit the type compile units (carefully to include all needed children in each type to make the most complete version of the type possible and emit them) in a sorted order to allow determinism. Then we fix up all DW_AT_ref_addr references in the normal CUs to point to the one type definition from the type compile units.



> Sorry if this is restating what has already been said/implied!

yep. That is pretty match the same scenario which I talked about.

The difference is that you propose to create type units(DW_TAG_type_unit) for the types while my suggestion is to use artificial compile unit(that would save space needed by type units headers).

> This would allow all types with the same DW_AT_decl_file to be stored in the same type compile unit.

Do you mean DW_TAG_type_unit or DW_TAG_compile_unit here?

It looks like we could not put several types into the same type unit:

"A type unit entry owns debugging information entries that
represent the definition of a single type, plus additional debugging information
entries that may be necessary to include as part of the definition of the type."

Why it would be good to group types on DW_AT_decl_file basis?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96035/new/

https://reviews.llvm.org/D96035



More information about the llvm-commits mailing list