-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Preserve most sub-obligations in the projection cache #85868
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit a3a287b0bfe095e1fd9bd4292a0e94f738a94cce with merge fa0462d22926332548181c1cd602c85dbb20fec8... |
☀️ Try build successful - checks-actions |
Queued fa0462d22926332548181c1cd602c85dbb20fec8 with parent 6a3dce9, future comparison URL. |
Finished benchmarking try commit (fa0462d22926332548181c1cd602c85dbb20fec8): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit a3a287b0bfe095e1fd9bd4292a0e94f738a94cce with merge d246c813ecc8de89cc5a05b9479dac8195a3e251... |
☀️ Try build successful - checks-actions |
Queued d246c813ecc8de89cc5a05b9479dac8195a3e251 with parent d4e7cb3, future comparison URL. |
Finished benchmarking try commit (d246c813ecc8de89cc5a05b9479dac8195a3e251): comparison url. Summary: This change led to significant regressions 😿 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
Error: Label perf-regression can only be set by Rust team members Please let |
a3a287b
to
fbfe5ba
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit fbfe5baaf5d5faff7450209c02a699ad25948230 with merge 7d3788b67103a424bf6612495afedb80c4fe8b10... |
☀️ Test successful - checks-actions |
As expected, this was flagged as causing mixed performance changes in instruction counts during weekly performance triage. Since these changes in performance were anticipating and discussed above, I'm marking as already-triaged. Update: whoops, it was already marked accordingly. Sorry for the noise! |
It's already in current beta (Zulip comment) @rustbot label -beta-nominated |
Do we want to nominate for stable? How concerned are we about this incremental issue? @rust-lang/compiler |
Adds the minimial repro test case from rust-lang#85360. The fix for rust-lang#85360 was supposed to be rust-lang#85868 however the repro was resolved in the 2021-07-05 nightly while rust-lang#85360 didn't land until 2021-09-03. The reason for that is d34a3a4 **also** resolves that issue. To test if rust-lang#85868 actually fixes rust-lang#85360, I reverted d34a3a4 and found that rust-lang#85868 does indeed resolve rust-lang#85360. With that question resolved, add a test case to our incremental test suite for the original Ok(EvaluatedToOkModuloRegions) ICE. Thanks to @lqd for helping track this down!
Add test for evaluate_obligation: Ok(EvaluatedToOkModuloRegions) ICE Adds the minimial repro test case from rust-lang#85360. The fix for rust-lang#85360 was supposed to be rust-lang#85868 however the repro was resolved in the 2021-07-05 nightly while rust-lang#85868 didn't land until 2021-09-03. The reason for that is d34a3a4 **also** resolves that issue. To test if rust-lang#85868 actually fixes rust-lang#85360, I reverted d34a3a4 and found that rust-lang#85868 does indeed resolve rust-lang#85360. With that question resolved, add a test case to our incremental test suite for the original Ok(EvaluatedToOkModuloRegions) ICE. Thanks to `@lqd` for helping track this down!
Add test for evaluate_obligation: Ok(EvaluatedToOkModuloRegions) ICE Adds the minimial repro test case from rust-lang#85360. The fix for rust-lang#85360 was supposed to be rust-lang#85868 however the repro was resolved in the 2021-07-05 nightly while rust-lang#85868 didn't land until 2021-09-03. The reason for that is d34a3a4 **also** resolves that issue. To test if rust-lang#85868 actually fixes rust-lang#85360, I reverted d34a3a4 and found that rust-lang#85868 does indeed resolve rust-lang#85360. With that question resolved, add a test case to our incremental test suite for the original Ok(EvaluatedToOkModuloRegions) ICE. Thanks to ``@lqd`` for helping track this down!
Add test for evaluate_obligation: Ok(EvaluatedToOkModuloRegions) ICE Adds the minimial repro test case from rust-lang#85360. The fix for rust-lang#85360 was supposed to be rust-lang#85868 however the repro was resolved in the 2021-07-05 nightly while rust-lang#85868 didn't land until 2021-09-03. The reason for that is d34a3a4 **also** resolves that issue. To test if rust-lang#85868 actually fixes rust-lang#85360, I reverted d34a3a4 and found that rust-lang#85868 does indeed resolve rust-lang#85360. With that question resolved, add a test case to our incremental test suite for the original Ok(EvaluatedToOkModuloRegions) ICE. Thanks to ```@lqd``` for helping track this down!
Add test for evaluate_obligation: Ok(EvaluatedToOkModuloRegions) ICE Adds the minimial repro test case from rust-lang#85360. The fix for rust-lang#85360 was supposed to be rust-lang#85868 however the repro was resolved in the 2021-07-05 nightly while rust-lang#85868 didn't land until 2021-09-03. The reason for that is d34a3a4 **also** resolves that issue. To test if rust-lang#85868 actually fixes rust-lang#85360, I reverted d34a3a4 and found that rust-lang#85868 does indeed resolve rust-lang#85360. With that question resolved, add a test case to our incremental test suite for the original Ok(EvaluatedToOkModuloRegions) ICE. Thanks to ````@lqd```` for helping track this down!
Adds the minimial repro test case from rust-lang#85360. The fix for rust-lang#85360 was supposed to be rust-lang#85868 however the repro was resolved in the 2021-07-05 nightly while rust-lang#85360 didn't land until 2021-09-03. The reason for that is d34a3a4 **also** resolves that issue. To test if rust-lang#85868 actually fixes rust-lang#85360, I reverted d34a3a4 and found that rust-lang#85868 does indeed resolve rust-lang#85360. With that question resolved, add a test case to our incremental test suite for the original Ok(EvaluatedToOkModuloRegions) ICE. Thanks to @lqd for helping track this down!
Fixes #85360
When we evaluate a projection predicate, we may produce sub-obligations. During trait evaluation, evaluating these sub-obligations might cause us to produce
EvaluatedToOkModuloRegions
.When we cache the result of projection in our projection cache, we try to throw away some of the sub-obligations, so that we don't need to re-evaluate/process them the next time we need to perform this particular projection. However, we may end up throwing away predicates that will (recursively) evaluate to
EvaluatedToOkModuloRegions
. If we do, then the result of evaluating a predicate will depend on the state of the predicate cache - this is global untracked state, which interacts badly with incremental compilation.To fix this, we now only discard global predicates that evaluate to
EvaluatedToOk
. This ensures that any predicates that (may) evaluate toEvaluatedToOkModuloRegions
are kept in the cache, and influence the results of any queries which perform this projection.