Skip to content
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

Add cg_clif as optional codegen backend #77975

Merged
merged 1,724 commits into from
Oct 26, 2020
Merged

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Oct 15, 2020

Rustc_codegen_cranelift is an alternative codegen backend for rustc based on Cranelift. It has the potential to improve compilation times in debug mode. In my experience the compile time improvements over debug mode LLVM for a clean build are about 20-30% in most cases.

This PR adds cg_clif as optional codegen backend. By default it is only enabled for ./x.py check. It can be enabled for ./x.py build too by adding cranelift to the rust.codegen-backends array in config.toml.

MCP: rust-lang/compiler-team#270

r? @Mark-Simulacrum

bjorn3 and others added 30 commits June 16, 2020 11:02
This reverts commit af0fa74.

It didn't do anything
The previous translation was wrong for signed 128bit comparisions

This fixes several libcore tests
Assignments are no longer used to implicitly cast between &mut T and &T
…#1054)

* Longer README about how to use this instead of `cargo run`

Resolves rust-lang#1052.

Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 26, 2020
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Oct 26, 2020

📌 Commit ac4f7de has been approved by Mark-Simulacrum

@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 26, 2020
@bors
Copy link
Contributor

bors commented Oct 26, 2020

⌛ Testing commit ac4f7de with merge 35debd4...

@bors
Copy link
Contributor

bors commented Oct 26, 2020

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 35debd4 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 26, 2020
@bors bors merged commit 35debd4 into rust-lang:master Oct 26, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 26, 2020
@bjorn3 bjorn3 deleted the cg_clif_subtree3 branch October 26, 2020 18:51
This was referenced Oct 26, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Nov 3, 2020
…=jyn514

Sync rustc_codegen_cranelift

This fixes bootstrapping of rustc using cg_clif again. It regressed a while before rust-lang#77975 got merged.

Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/743
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Nov 3, 2020
…=jyn514

Sync rustc_codegen_cranelift

This fixes bootstrapping of rustc using cg_clif again. It regressed a while before rust-lang#77975 got merged.

Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/743
@jonas-schievink
Copy link
Contributor

I think this has broken -Cpasses=list, which is now empty, as well as the LLVM version output in rustc -Vv, which is now missing

@bjorn3
Copy link
Member Author

bjorn3 commented Jan 13, 2021

Oops. I used cfg!(llvm) instead of cfg!(feature = "llvm") for those.

@bjorn3
Copy link
Member Author

bjorn3 commented Jan 13, 2021

Opened #80981

JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jan 14, 2021
…evink

Fix -Cpasses=list and llvm version print with -vV

cc rust-lang#77975 (comment)
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jan 14, 2021
…evink

Fix -Cpasses=list and llvm version print with -vV

cc rust-lang#77975 (comment)
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jan 14, 2021
…evink

Fix -Cpasses=list and llvm version print with -vV

cc rust-lang#77975 (comment)
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Jan 14, 2021
…evink

Fix -Cpasses=list and llvm version print with -vV

cc rust-lang#77975 (comment)
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Jan 14, 2021
…evink

Fix -Cpasses=list and llvm version print with -vV

cc rust-lang#77975 (comment)
@LeSeulArtichaut LeSeulArtichaut added the A-cranelift Things relevant to the [future] cranelift backend label Jul 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cranelift Things relevant to the [future] cranelift backend 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.