-
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
Remove concept of 'completion' from the projection cache #88945
Conversation
Fixes rust-lang#88910 When we initially store a `NormalizedTy` in the projection cache, we discard all obligations that we can (while ensuring that we don't cause any issues with incremental compilation). Marking a projection cache entry as 'completed' discards all obligations associated with it. This can only cause problems, since any obligations stored in the cache are there for a reason (e.g. they evaluate to `EvaluatedToOkModuloRegions`). This commit removes `complete` and `complete_normalized` entirely.
r? @wesleywiser (rust-highfive has picked a reviewer for you, use r? to override) |
I've verified locally that this fixes #88910. However, the This PR can only ever cause us to preserve more sub-obligations in the cache, so this can't cause any correctness issues. |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 055651d with merge aefb79dfee71c0899b706198d9d9f4ca30ca395d... |
☀️ Try build successful - checks-actions |
Queued aefb79dfee71c0899b706198d9d9f4ca30ca395d with parent c3c0f80, future comparison URL. |
Finished benchmarking commit (aefb79dfee71c0899b706198d9d9f4ca30ca395d): comparison url. Summary: This change led to moderate relevant mixed results 🤷 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. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reasoning and code look good to me and the perf regression seems acceptable since this closes an incremental issue, but I would like to make sure wg-traits is aware this is happening. r=me with an acknowledgement from them.
This looks fine to me; these obligations can get cached in the fulfill code anyways (which is probably why there isn't a big regression). Though I don't think this change in particular will cause any regressions, I do just want to register a slight worry, particularly seeing issues like #88969 pop up. I suppose this mostly just stems from the fact that we still don't have a test for #85868. The more we mess with this code, the more I'd really like a regression test. |
@bors r=wesleywiser,jackh726 |
📌 Commit 055651d has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e0c38af): comparison url. Summary: This change led to moderate relevant mixed results 🤷 in compiler performance.
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 |
Visited for weekly performance triage. All wg-grammar-* consistently regressed by about 0.75% (both full and incr-full). The builds for regression-31157-check regressed by about 0.36%, which isn't as bad. Under our new significance metrics, the ctfe-stress-4 changes are not considered signficant. Seems like something might be worth looking into here. (But did not hit very many benchmarks, so time might be better spent elsewhere. Definitely don't spend too much time on it.) |
Fixes #88910
When we initially store a
NormalizedTy
in the projection cache,we discard all obligations that we can (while ensuring that we
don't cause any issues with incremental compilation).
Marking a projection cache entry as 'completed' discards all
obligations associated with it. This can only cause problems,
since any obligations stored in the cache are there for a reason
(e.g. they evaluate to
EvaluatedToOkModuloRegions
).This commit removes
complete
andcomplete_normalized
entirely.