[PATCH] D121635: [lld][macho][elf] Teach the bump-allocator in lld/Common about thread-safetiness.

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 13:57:56 PDT 2022


int3 added a comment.

> ok - that's an orthogonal problem :)

I dunno if that's orthogonal, I think that's actually the crux of https://github.com/llvm/llvm-project/issues/54378 -- I don't believe there are any other threads that allocate ATM, aside from the trieBuilder's and SymtabSection's. Using `make<>` in a single thread running in parallel is fine as long as the other threads don't allocate too...

> It'd seem weird to have x parts of the linker use a thread-safe allocator, then y remaining parts don't ...

Mm that's a good point, consistency is clarity. But still, we could switch the entire linker to use the system allocator and see what the perf hit is. Maaaybe rpmalloc/jemalloc performs well enough that the additional BumpPtrAllocator layering isn't necessary.


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