diff options
author | Fangrui Song <i@maskray.me> | 2022-09-12 12:56:35 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-09-12 12:56:35 -0700 |
commit | e6aebff67426fa0f9779a0c19d6188a043bf15e7 (patch) | |
tree | cc7065c489614dbdd54642373a6241c42790ffca /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
parent | 7cfff0f2769b8923c5d86a9c137460e8df80d4da (diff) | |
download | llvm-e6aebff67426fa0f9779a0c19d6188a043bf15e7.zip llvm-e6aebff67426fa0f9779a0c19d6188a043bf15e7.tar.gz llvm-e6aebff67426fa0f9779a0c19d6188a043bf15e7.tar.bz2 |
[ELF] Parallelize relocation scanning
* Change `Symbol::flags` to a `std::atomic<uint16_t>`
* Add `llvm::parallel::threadIndex` as a thread-local non-negative integer
* Add `relocsVec` to part.relaDyn and part.relrDyn so that relative relocations can be added without a mutex
* Arbitrarily change -z nocombreloc to move relative relocations to the end. Disable parallelism for deterministic output.
MIPS and PPC64 use global states for relocation scanning. Keep serial scanning.
Speed-up with mimalloc and --threads=8 on an Intel Skylake machine:
* clang (Release): 1.27x as fast
* clang (Debug): 1.06x as fast
* chrome (default): 1.05x as fast
* scylladb (default): 1.04x as fast
Speed-up with glibc malloc and --threads=16 on a ThunderX2 (AArch64):
* clang (Release): 1.31x as fast
* scylladb (default): 1.06x as fast
Reviewed By: andrewng
Differential Revision: https://reviews.llvm.org/D133003
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions