[PATCH] D54802: [LLD][COFF] Generate import modules in PDB

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 15 13:32:52 PDT 2019


aganea updated this revision to Diff 190888.
aganea marked 6 inline comments as done.
aganea added a comment.

Simplify & addressed comments.

I took the liberty to remove COFF groups from the MinGW target. This was adding a significant footprint to the PDB, given that each function is in its own .text section.
As an additionnal side-effect, MinGW PDBs shall now be much smaller, because we don't emit empty debug streams anymore.

As an example, using Martin's test package <https://martin.st/temp/vlc-qt-plugin-repro.zip>, I generated libqt_plugin.pdb:

| trunk            |                |                   | 21 MB   |
|                  | coff groups    | import modules    | 27.1 MB |
| **(this patch)** | no coff groups | import modules    | 13.5 MB |
|                  | no coff groups | no import modules | 13.3 MB |
|

The impact is less significat in non-MinGW, on a 1 GB PDB this patch adds 2 MB and scales with the size (actually depends on the number of imported libraries).


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

https://reviews.llvm.org/D54802

Files:
  lld/trunk/COFF/Driver.cpp
  lld/trunk/COFF/InputFiles.cpp
  lld/trunk/COFF/PDB.cpp
  lld/trunk/COFF/Writer.cpp
  lld/trunk/COFF/Writer.h
  lld/trunk/test/COFF/pdb-global-gc.yaml
  lld/trunk/test/COFF/pdb-lib.s
  lld/trunk/test/COFF/pdb-publics-import.test
  lld/trunk/test/COFF/pdb.test
  llvm/trunk/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp
  llvm/trunk/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54802.190888.patch
Type: text/x-patch
Size: 29054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190315/bee8ae3d/attachment.bin>


More information about the llvm-commits mailing list