Unverified Commit f2f01f6b authored by Jeff Niu's avatar Jeff Niu Committed by GitHub
Browse files

[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: default avatarMehdi Amini <joker.eph@gmail.com>
parent b8cc3ba4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment