[PATCH] D120626: [ELF] Move section assignment from initializeSymbols to postParse

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 26 23:57:07 PST 2022


MaskRay created this revision.
Herald added subscribers: ormris, steven_wu, hiraditya, arichardson, emaste.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

https://discourse.llvm.org/t/parallel-input-file-parsing/60164

initializeSymbols currently sets Defined::section and handles non-prevailing
COMDAT groups. Move the code to the parallel postParse to reduce work from the
single-threading code path and make parallel section initialization infeasible.

Postpone reporting duplicate symbol errors so that the messages have the
section information. (`Defined::section` is assigned in postParse and another
thread may not have the information).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120626

Files:
  lld/ELF/Driver.cpp
  lld/ELF/Driver.h
  lld/ELF/InputFiles.cpp
  lld/ELF/Symbols.cpp
  lld/test/ELF/comdat-discarded-lazy.s
  lld/test/ELF/duplicated-synthetic-sym.s
  lld/test/ELF/exclude-discarded-error2.s
  lld/test/ELF/lto/comdat-mixed-archive.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120626.411660.patch
Type: text/x-patch
Size: 10595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220227/16f4878f/attachment.bin>


More information about the llvm-commits mailing list