-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup LLVM multi-threading checks #89808
Conversation
The support for runtime multi-threading was removed from LLVM. Calls to `LLVMStartMultithreaded` became no-ops equivalent to checking if LLVM was compiled with support for threads http://reviews.llvm.org/D4216.
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
r? @nagisa |
INIT.call_once(|| bug!("llvm is not initialized")); | ||
if POISONED.load(Ordering::SeqCst) { | ||
bug!("couldn't enable multi-threaded LLVM"); | ||
if !INIT.is_completed() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is somewhat more racy than the previous version. Previously call_once
would block if the confiugre_llvm
from another call to init
was already being executed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thinking was that if there is a race, a thread executing require_inited
might win and this would indicate a presence of a bug that needs to be fixed regardless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, fair.
Seems good overall. r=me after |
@bors r+ |
📌 Commit aa3bf01 has been approved by |
Cleanup LLVM multi-threading checks The support for runtime multi-threading was removed from LLVM. Calls to `LLVMStartMultithreaded` became no-ops equivalent to checking if LLVM was compiled with support for threads http://reviews.llvm.org/D4216.
Cleanup LLVM multi-threading checks The support for runtime multi-threading was removed from LLVM. Calls to `LLVMStartMultithreaded` became no-ops equivalent to checking if LLVM was compiled with support for threads http://reviews.llvm.org/D4216.
Cleanup LLVM multi-threading checks The support for runtime multi-threading was removed from LLVM. Calls to `LLVMStartMultithreaded` became no-ops equivalent to checking if LLVM was compiled with support for threads http://reviews.llvm.org/D4216.
☀️ Test successful - checks-actions |
Finished benchmarking commit (56694b0): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
The support for runtime multi-threading was removed from LLVM. Calls to
LLVMStartMultithreaded
became no-ops equivalent to checking if LLVMwas compiled with support for threads http://reviews.llvm.org/D4216.