These changes improve the threadprivate implementation to allow the compiler to reuse the same caches consistently, without allocating new ones. To do this, we make it possible to resize caches when needed, and to point the compiler's pointer at newly resized caches. The implementation also works with older compilers by looking up existing caches rather than creating new ones. Because older compilers still call into the kmpc_threadprivate_cached function repeatedly, we still suffer the performance of the frequent locking to look up the existing cache. Future compilers should only call kmpc_threadprivate_cached once per piece of threadprivate data per global thread id.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
runtime/src/kmp_threadprivate.cpp | ||
---|---|---|
714 ↗ | (On Diff #129320) | Should we rephrase this so that it doesn't include 18.0/19.0? |