[all-commits] [llvm/llvm-project] f2f01f: [llvm][Support] Use `thread_local` caching for llv...
Jeff Niu via All-commits
all-commits at lists.llvm.org
Mon Apr 1 14:00:15 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f2f01f6b03aa81d5bdbf841a88f8853620c6902b
https://github.com/llvm/llvm-project/commit/f2f01f6b03aa81d5bdbf841a88f8853620c6902b
Author: Jeff Niu <jeff at modular.com>
Date: 2024-04-01 (Mon, 01 Apr 2024)
Changed paths:
M llvm/lib/Support/Unix/Threading.inc
Log Message:
-----------
[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 at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list