Make x test --stage 2 compiler/rustc_XXX faster to run#96000
Conversation
Previously, bootstrap unconditionally rebuilt the stage 2 compiler, even if it had previously built stage 1. This changes it to reuse stage 1 if possible.
|
(rust-highfive has picked a reviewer for you, use r? to override) |
|
Oh, I just realized - we should probably audit all the CI jobs to make sure they're building at most 2 compilers. It's very easy to call |
|
I'm not sure I have in-cache enough the details to be certain, but I will say that any cross-compiling CI I think today goes up to stage 2 for the build triple and then cross-compiles from there (maybe I am wrong, I recall some work in that area a few years back, but it's been a while). It seems like a good idea overall though. I am not sure whether compiler/compiler_for is a meaningful + worthwhile distinction; I think the best way to find out is probably to try to unify and see what goes wrong. I suspect the intent behind the addition was largely the typical "it seems like this one place wants something slightly different" that perhaps was more of a patchwork fix than done with long-term correctness, so it's unlikely to be super principled I expect in terms of where it's used and such. |
|
@bors r+ rollup=iffy Going to approve this change, though I wouldn't be too surprised if it bounces off CI in some obscure way :) I think it's not hurtful and may be helpful. |
|
📌 Commit 070bd64 has been approved by |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (74582ac): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Footnotes |
I tried changing this and it went ... not well. Removing Looking at the call sites, they usually look like this: fn make_run(run: RunConfig<'_>) {
run.builder.ensure($name {
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
target: run.target,
extra_features: Vec::new(),
});
}so I think the "proper" fix is to pass Don't have time for that soon, but I'll open an issue and hopefully someone grabs it. |
|
Visiting for weekly performance triage. It seems like syn-1.0.89 opt full suddenly became much noisier around 2022-04-17, and I do not know why: @rustbot label: +perf-regression-triaged |

Previously, bootstrap unconditionally rebuilt the stage 2 compiler,
even if it had previously built stage 1. This changes it to reuse stage 1 if possible.
In particular, it no longer runs the following step: