[LLD][COFF] Early dependency detection
authorAlexandre Ganea <alexandre.ganea@ubisoft.com>
Mon, 1 Apr 2019 13:36:59 +0000 (13:36 +0000)
committerAlexandre Ganea <alexandre.ganea@ubisoft.com>
Mon, 1 Apr 2019 13:36:59 +0000 (13:36 +0000)
commitbf55c4e3e390e108decb5023cb785dddd422c78f
tree89de6860ee5e529cd6e27214715dd1fb5692a4f7
parent97d1bc44544f27f7e8175588e24394ab68c5d521
[LLD][COFF] Early dependency detection

We introduce a new class hierarchy for debug types merging (in DebugTypes.h). The end-goal is to parallelize the type merging - please see the plan in D59226.

Previously, dependency discovery was done on the fly, much later, during the type merging loop. Unfortunately, parallelizing the type merging requires the dependencies to be merged in first, before any dependent ObjFile, thus this early discovery.

The overall intention for this path is to discover debug information dependencies at a much earlier stage, when processing input files. Currently, two types of dependency are supported: PDB type servers (when compiling with MSVC /Zi) and precompiled headers OBJs (when compiling with MSVC /Yc and /Yu). Once discovered, an explicit link is added into the dependent ObjFile, through the new debug types class hierarchy introduced in DebugTypes.h.

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

llvm-svn: 357383
lld/COFF/CMakeLists.txt
lld/COFF/DebugTypes.cpp [new file with mode: 0644]
lld/COFF/DebugTypes.h [new file with mode: 0644]
lld/COFF/InputFiles.cpp
lld/COFF/InputFiles.h
lld/COFF/PDB.cpp