[PATCH] D121635: [lld][macho][elf] Teach the bump-allocator in lld/Common about thread-safetiness.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 14 21:35:01 PDT 2022
MaskRay added a comment.
> (Conceptually the bump-allocator can be implemented without locks using atomic incr', but looking at the current impl, I kind of got discouraged as it seemed too complex)
I agree it adds complexity and likely slows down single-threading usage.
The places that concurrent `make<Foo>()` improves performance are not dominant. It may make sense to create a dedicated `make` like function for parallelism.
For example, in lld/ELF, I can use `makeT<InputSection>` in parallel initialization of sections. For others places the current `make<Foo>` suffices.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121635/new/
https://reviews.llvm.org/D121635
More information about the llvm-commits
mailing list