-
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
Test that the compiler/library builds with validate-mir #105736
Test that the compiler/library builds with validate-mir #105736
Conversation
r? @jyn514 (rustbot has picked a reviewer for you, use r? to override) |
0bc4dc1
to
6098888
Compare
@jyn514 I think this is good to go now, the fix just merged |
a37296b
to
cdfdf77
Compare
@saethlin |
This comment has been minimized.
This comment has been minimized.
Ah, those are not going to pass as a result of any other PR, you need to do something here to get their output back to what they're supposed to be. Probably we want to default all test suites to MIR opt level 3, except for the mir-opt suite. You'll probably also run into breakage in codegen or debuginfo tests from changing their MIR opt level, that might resolve itself when #105577 lands. |
That implies we need to not set |
Is it this line make compiletest run with different options? when in |
8e0f54e
to
ef7db07
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
99d823f
to
9beb57a
Compare
@saethlin x test --stage 1 src/test/mir-opt If so, we can not enable it for |
This comment has been minimized.
This comment has been minimized.
Ah yeah I should have expected this. Let me do some experimentation (based on your branch) locally, I'll get back to you within a day. |
Thanks, use this to reproduce it locally: ./configure --set rust.validate-mir-opts=3
x test --stage 1 src/test/mir-opt |
I think we're in a sticky situation here. What I originally envisioned was a fully separate step in CI where we only build and do not run any tests, we would just rely on the MIR validation. If that's possible to do, I think it is the best way to dodge the situation I will ramble on about now. The problem you're running into is we compile the standard library ahead of time with a separate set of flags than are specified in mir-opt and codegen tests (and I suppose various other UI tests as well). So changing the build settings for the standard library will break tests when standard library functions get inlined into the tests. One other way around this is to always build the distributed standard library at the higher MIR opt level, then bless the tests. I'm told cranelift uses a higher MIR opt level for the standard library already, though based on gestures broadly I don't think I would advise doing that at this moment. (This also drags in the question of what happens to users of build-std, do they get a standard library with less optimizations because the default release build is mir opt level 2? That seems bad.) |
I think for now we should only land this for the standard library itself; I think that would have avoided most of the issues @saethlin mentioned in the past. We can worry about doing it for the test suite and compiler later. |
Oh I see, even doing it for just the standard library causes issues. That's ... very unfortunate. We don't run any tests on mingw-check - maybe we can add this new check to only that builder? Then the different MIR output shouldn't cause any tests to fail.
I don't think we should penalize all users just because some users wouldn't benefit. As long as we're not actively hurting build-std people, I don't think that should be a reason to avoid adding more optimizations for dist builds (Mark-Simulacrum has already said a few times people should use the official builds if they want to match performance characteristics anyway). But if you're not confident all the opt-level=2 opts are sound, we can avoid turning them on for now. |
31129c7
to
1302069
Compare
12ca5a4
to
15813cf
Compare
This looks good to me! can you just verify by looking at the CI logs that |
📌 Commit 7d3457bb1220df1afac72eab41806c82cb67d250 has been approved by It is now in the queue for this repository. |
oh sorry, can you fix #105736 (comment) first? @bors r- delegate=chenyukang (please use |
✌️ @chenyukang can now approve this pull request |
📌 Commit 7d3457bb1220df1afac72eab41806c82cb67d250 has been approved by `jyn514`` It is now in the queue for this repository. |
@bors r- |
7d3457b
to
001bcee
Compare
@bors r=jyn514 |
…mpiler-errors Rollup of 7 pull requests Successful merges: - rust-lang#105736 (Test that the compiler/library builds with validate-mir) - rust-lang#107291 ([breaking change] Remove a rustdoc back compat warning) - rust-lang#107675 (Implement -Zlink-directives=yes/no) - rust-lang#107848 (Split `x setup` sub-actions to CLI arguments) - rust-lang#107911 (Add check for invalid #[macro_export] arguments) - rust-lang#108229 ([107049] Recognise top level keys in config.toml.example) - rust-lang#108333 (Make object bound candidates sound in the new trait solver) Failed merges: - rust-lang#108337 (hir-analysis: make a helpful note) r? `@ghost` `@rustbot` modify labels: rollup
Fixes #105706