[PATCH] D119909: [ELF] Parallelize initializeLocalSymbols and postpone postParse
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 22 09:53:28 PST 2022
MaskRay added a comment.
In D119909#3337162 <https://reviews.llvm.org/D119909#3337162>, @ikudrin wrote:
> In D119909#3336805 <https://reviews.llvm.org/D119909#3336805>, @MaskRay wrote:
>
>> Replace `getSpecificAllocSingleton<SymbolUnion>().Allocate(firstGlobal);` with `localSymStorage`.
>>
>> 1.02x as fast when linking clang
>> 1.04x as fast when linking chrome
>>
>> I plan to commit the change separately to decrease diff, but for single threading there is no observable difference for performance.
>
> Do you know where the performance gain comes from? Can the same optimization be useful elsewhere? Can `localSymStorage` be `std::unique_ptr<SymbolUnion>` to avoid the low-level manipulations with the alignment?
NUMA aware allocation, memory reference locality, etc. `Symbols.h` includes `InputFiles.h`. `SymbolUnion` is not accessible in `InputFiles.h`, so `localSymStorage` cannot use `std::unique_ptr<SymbolUnion[]>` with incomplete type.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119909/new/
https://reviews.llvm.org/D119909
More information about the llvm-commits
mailing list