[all-commits] [llvm/llvm-project] 1e5b7e: [PDB] Split TypeServerSource and extend type index...

Reid Kleckner via All-commits all-commits at lists.llvm.org
Thu Sep 17 11:53:34 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1e5b7e91aa64c267e495cb4bd8351b1840694437
      https://github.com/llvm/llvm-project/commit/1e5b7e91aa64c267e495cb4bd8351b1840694437
  Author: Reid Kleckner <rnk at google.com>
  Date:   2020-09-17 (Thu, 17 Sep 2020)

  Changed paths:
    M lld/COFF/DebugTypes.cpp
    M lld/COFF/DebugTypes.h
    M lld/COFF/InputFiles.cpp
    M lld/COFF/PDB.cpp
    M lld/COFF/TypeMerger.h

  Log Message:
  -----------
  [PDB] Split TypeServerSource and extend type index map lifetime

Extending the lifetime of these type index mappings does increase memory
usage (+2% in my case), but it decouples type merging from symbol
merging. This is a pre-requisite for two changes that I have in mind:
- parallel type merging: speeds up slow type merging
- defered symbol merging: avoid heap allocating (relocating) all symbols

This eliminates CVIndexMap and moves its data into TpiSource. The maps
are also split into a SmallVector and ArrayRef component, so that the
ipiMap can alias the tpiMap for /Z7 object files, and so that both maps
can simply alias the PDB type server maps for /Zi files.

Splitting TypeServerSource establishes that all input types to be merged
can be identified with two 32-bit indices:
- The index of the TpiSource object
- The type index of the record
This is useful, because this information can be stored in a single
64-bit atomic word to enable concurrent hashtable insertion.

One last change is that now all object files with debugChunks get a
TpiSource, even if they have no type info. This avoids some null checks
and special cases.

Differential Revision: https://reviews.llvm.org/D87736




More information about the All-commits mailing list