[all-commits] [llvm/llvm-project] 09602d: [ELF] Parallelize initializeLocalSymbols

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Feb 24 20:06:12 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 09602d3b47ec83abb2c26efa5a199c13b72c7abf
      https://github.com/llvm/llvm-project/commit/09602d3b47ec83abb2c26efa5a199c13b72c7abf
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-02-24 (Thu, 24 Feb 2022)

  Changed paths:
    M lld/ELF/Driver.cpp
    M lld/ELF/InputFiles.cpp
    M lld/ELF/InputFiles.h
    M lld/ELF/InputSection.cpp

  Log Message:
  -----------
  [ELF] Parallelize initializeLocalSymbols

ObjFile::parse combines symbol initialization and resolution. Many tasks
unrelated to symbol resolution can be postponed and parallelized. This patch
extracts local symbol initialization and parallelizes it.

Technically the new function initializeLocalSymbols can be merged into
ObjFile::postParse, but functions like getSrcMsg may access the
uninitialized (all nullptr) local part of InputFile::symbols.

Linking chrome: 1.02x as fast with glibc malloc, 1.04x as fast with mimalloc

Reviewed By: ikudrin

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




More information about the All-commits mailing list