This patch hides thread specific handling under LLVM_ENABLE_THREADS guard.
It also removes usages of thread_local variables, since it has a weak
support on some platforms. Instead, the patch uses single mutex for locking
allocator. That may be replaced with more effective allocator later.
f.e. D142318
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Original patch broke buildbots with memory leak. This new version removes usages of thread_local variables and adds checks for LLVM_ENABLE_THREADS
Comment Actions
It's a bit unfortunate that we have to sprinkle LLVM_ENABLE_THREADS throughout the code, but not enough that I think it's worth doing anything fancy like subclassing (I think it would just make things worse). LGTM.
llvm/include/llvm/DWARFLinkerParallel/StringPool.h | ||
---|---|---|
25 | Why not just StringAllocator. Do we expect to have a more "complex" allocator down the line? |
Why not just StringAllocator. Do we expect to have a more "complex" allocator down the line?