Skip to content

Conversation

@tmiasko
Copy link
Contributor

@tmiasko tmiasko commented Oct 12, 2021

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.

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.
@rust-highfive
Copy link
Contributor

r? @jackh726

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 12, 2021
@tmiasko
Copy link
Contributor Author

tmiasko commented Oct 13, 2021

r? @nagisa

@rust-highfive rust-highfive assigned nagisa and unassigned jackh726 Oct 13, 2021
@apiraino apiraino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 14, 2021
INIT.call_once(|| bug!("llvm is not initialized"));
if POISONED.load(Ordering::SeqCst) {
bug!("couldn't enable multi-threaded LLVM");
if !INIT.is_completed() {
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, fair.

@nagisa
Copy link
Member

nagisa commented Oct 16, 2021

Seems good overall. r=me after require_inited is restored. I don't see any reason to risk changing that function right now.

@nagisa
Copy link
Member

nagisa commented Oct 16, 2021

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 16, 2021

📌 Commit aa3bf01 has been approved by nagisa

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 16, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Oct 19, 2021
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.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 21, 2021
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.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 21, 2021
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.
@bors
Copy link
Collaborator

bors commented Oct 25, 2021

⌛ Testing commit aa3bf01 with merge 56694b0...

@bors
Copy link
Collaborator

bors commented Oct 25, 2021

☀️ Test successful - checks-actions
Approved by: nagisa
Pushing 56694b0 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 25, 2021
@bors bors merged commit 56694b0 into rust-lang:master Oct 25, 2021
@rustbot rustbot added this to the 1.58.0 milestone Oct 25, 2021
@tmiasko tmiasko deleted the llvm-multithreaded branch October 25, 2021 08:22
@rust-timer
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants