[PATCH] D116434: [lld-link] Replace LazyObjFile with lazy ObjFile/BitcodeFile

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 31 00:19:54 PST 2021


MaskRay created this revision.
MaskRay added reviewers: aganea, mstorsjo, rnk.
Herald added a subscriber: pengfei.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Similar to ELF 3a5fb57393c3bc77be9e7afc2ec9d4ec3c9bbf70 <https://reviews.llvm.org/rG3a5fb57393c3bc77be9e7afc2ec9d4ec3c9bbf70>.

- previously when a LazyObjFile was extracted, a new ObjFile/BitcodeFile was created; now the file is reused, just with `lazy` cleared
- avoid the confusing transfer of `symbols` from LazyObjFile to the new file
- simpler code, smaller executable (6500+ bytes smaller on x86-64)
- make eager parsing feasible (for parallel section/symbol table initialization)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116434

Files:
  lld/COFF/Driver.cpp
  lld/COFF/InputFiles.cpp
  lld/COFF/InputFiles.h
  lld/COFF/SymbolTable.cpp
  lld/COFF/SymbolTable.h
  lld/COFF/Symbols.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116434.396761.patch
Type: text/x-patch
Size: 9023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211231/483c459b/attachment.bin>


More information about the llvm-commits mailing list