diff options
author | Jeff Niu <jeff@modular.com> | 2024-04-01 13:59:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-01 22:59:53 +0200 |
commit | f2f01f6b03aa81d5bdbf841a88f8853620c6902b (patch) | |
tree | 8befa9d02e2b4ed89396f2ee53d6a19b903c8422 /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp | |
parent | b8cc3ba409dc850776f37e27613bf74f5a80d66a (diff) | |
download | llvm-f2f01f6b03aa81d5bdbf841a88f8853620c6902b.zip llvm-f2f01f6b03aa81d5bdbf841a88f8853620c6902b.tar.gz llvm-f2f01f6b03aa81d5bdbf841a88f8853620c6902b.tar.bz2 |
[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>
Diffstat (limited to 'clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp')
0 files changed, 0 insertions, 0 deletions