[PATCH] D122922: [lld][common][lld-macho] Support per-thread allocators and StringSavers
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 1 10:52:49 PDT 2022
oontvoo created this revision.
oontvoo added reviewers: int3, MaskRay.
Herald added a subscriber: StephenFan.
Herald added a project: All.
oontvoo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Details:
(near final draft)
Provide thread-safe StringSaver and bAlloc by assigning each thread its own StringSaver and allocator.
Usage: code that might be run in different threads should call the new perThreadSaver() or makeThreadSafe()
instead of the current util (saver() and make())
Some considerations:
- This might have some perf/memroy impact.
- TLS support might not be available on all archs. (Darwin?)
TODO: Run some benchmarks
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D122922
Files:
lld/Common/CommonLinkerContext.cpp
lld/Common/Memory.cpp
lld/include/lld/Common/CommonLinkerContext.h
lld/include/lld/Common/Memory.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122922.419806.patch
Type: text/x-patch
Size: 5844 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220401/6ef3364e/attachment.bin>
More information about the llvm-commits
mailing list