Files
clang-p2996/llvm/lib/Support/Unix/Threading.inc
Jeff Niu f2f01f6b03 [llvm][Support] Use thread_local caching for llvm::get_threadid() query on Apple systems (#87219)
I was profiling our compiler and noticed that `llvm::get_threadid` was
at the top of the hotlist, taking up a surprising 5% (7 seconds) in the
profile trace. It seems that computing this on MacOS systems is
non-trivial, so cache the result in a thread_local.

Co-authored-by: Mehdi Amini <joker.eph@gmail.com>
2024-04-01 22:59:53 +02:00

14 KiB