[ELF] Parallelize input section initialization
This implements the last step of https://discourse.llvm.org/t/parallel-input-file-parsing/60164 for the ELF port. For an ELF object file, we previously did: parse, (parallel) initializeLocalSymbols, (parallel) postParseObjectFile. Now we do: parse, (parallel) initSectionsAndLocalSyms, (parallel) postParseObjectFile. initSectionsAndLocalSyms does most of input section initialization. The sequential `parse` does SHT_ARM_ATTRIBUTES/SHT_RISCV_ATTRIBUTES/SHT_GROUP initialization for now. Performance linking some programs with --threads=8 (glibc 2.33 malloc and mimalloc): * clang: 1.05x as fast with glibc malloc, 1.03x as fast with mimalloc * chrome: 1.04x as fast with glibc malloc, 1.03x as fast with mimalloc * internal search program: 1.08x as fast with glibc malloc, 1.05x as fast with mimalloc Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D130810
Loading
Please sign in to comment