-
Notifications
You must be signed in to change notification settings - Fork 69
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
Integration of the Cranelift backend with rustc #270
Comments
I think we should wait for clippy subtree to land (just to get the subtree infrastructure, documentation, etc. in place) -- I expect that to happen in the next few weeks. After that, I am willing to help or perhaps implement the build system changes necessary for integrating cranelift's codegen backend. I suspect we will also want to line up a technical reviewer for compiler integration, though I think I can review that as well (and to some extent I don't know that there will be review required there beyond cleanup that occurs in an ongoing fashion). |
Agreed
I think this will involve a partial revert of rust-lang/rust#67077. Before that PR |
Hm, so I think that depends. If a build of cranelift is quick enough that we can enable it by default for developers (I hope it is), then I imagine we could statically link both and just have an if in the codegen backend selection. Even if it isn't quick, I'd strongly prefer that we statically link it (behind a Cargo feature flag or so) just because that is likely to be much easier to get working on various systems, and then expose a -Zcodegen-cranelift flag to switch to it (or perhaps even a |
Statically linking it would require adding all necessary rustc crates to
A full rebuild in release mode takes ~2min on my system.
The way I proposed it, that would be
The codegen backend is called immediately after the |
Added to our compiler team meeting agenda, removing |
It's been about two months, how has the clippy subtree been working out? Does that still seem like the way to go for cg_clif? |
cc @oli-obk @Manishearth -- I think it's been working out reasonably well, but I'm not sure if we have done the "rust repo -> clippy repo" style merges yet. |
@nikomatsakis we've been using |
@Manishearth we're using Once you gone through the |
More about issues we have with In-depth documentation on how we use |
@flip1995 ugh i keep getting confused between subrepo and subtree. thanks I think it's fine to use a forked subtree especially if fixes are incoming |
@rustbot second |
…acrum Add cg_clif as optional codegen backend 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`
TL;DR
git subtree
and gate PR's on it building.annotate all LLVM specific tests.
Links and Details
This will first use
git subtree
to integrate the cg_clif repo. Then changes to bootstrap andcompiletest are needed to be able to build and test it. Next CI will need to gate PR's on cg_clif
building. CI will not run any tests for cg_clif. Finally all add a way to annotate tests as
requiring a specific backend and annotate all LLVM specific tests as such.
Mentors or Reviewers
Maybe @Mark-Simulacrum for bootstrap changes?
The text was updated successfully, but these errors were encountered: