[all-commits] [llvm/llvm-project] d496ab: [lld-link] Replace LazyObjFile with lazy ObjFile/B...

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Jan 4 15:12:01 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d496abbe2a03721d5d22a697a3a1c5961a55f7f2
      https://github.com/llvm/llvm-project/commit/d496abbe2a03721d5d22a697a3a1c5961a55f7f2
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-01-04 (Tue, 04 Jan 2022)

  Changed paths:
    M lld/COFF/Driver.cpp
    M lld/COFF/InputFiles.cpp
    M lld/COFF/InputFiles.h
    M lld/COFF/SymbolTable.cpp
    M lld/COFF/SymbolTable.h
    M lld/COFF/Symbols.h

  Log Message:
  -----------
  [lld-link] Replace LazyObjFile with lazy ObjFile/BitcodeFile

Similar to ELF 3a5fb57393c3bc77be9e7afc2ec9d4ec3c9bbf70.

* 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 (5200+ bytes smaller on x86-64)
* make eager parsing feasible (for parallel section/symbol table initialization)

Reviewed By: aganea, rnk

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




More information about the All-commits mailing list