[lld] ELF: Switch to parallelSort for RELR relocations. (PR #138370)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri May 2 19:39:29 PDT 2025
MaskRay wrote:
(Still on a trip with limited computer access)
We call `updateAllocSize` on sections like `.relr.dyn` and `.rela.dyn`. Since `.relr.dyn` is predominant in PIEs, parallelism could be beneficial.
I likely tested `parallelSort` around 2022 (around commit da0e5b885b25cf4ded0fa89b965dc6979ac02ca9) while optimizing `-z combreloc` but saw no significant improvement, so I didn't pursue it.
Using `parallelSort` in `computeRels` is a compromise due to our basic scheduler's lack of support for nested parallelism (see https://reviews.llvm.org/D61115) and how lld parallelizes OutputSection and InputSectionBase write https://reviews.llvm.org/D131247 .
However, updateAllocSize should be fine, as it’s called within finalizeAddressDependentContent without nested parallelism requirements.
https://github.com/llvm/llvm-project/pull/138370
More information about the llvm-commits
mailing list