-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Address performance regression introduced by #90218 #90845
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 e0269a0aa302126ff020ff09791bfde05f8620dd with merge 5edbd592d7d24d3910283d67f944fc057d860f7d... |
(Feel free to review as well, but I can try to help if you don't have a chance) |
☀️ Try build successful - checks-actions |
Queued 5edbd592d7d24d3910283d67f944fc057d860f7d with parent e90c5fb, future comparison URL. |
Finished benchmarking commit (5edbd592d7d24d3910283d67f944fc057d860f7d): comparison url. Summary: This change led to very large relevant improvements 🎉 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. @bors rollup=never |
e0269a0
to
b06ca46
Compare
b06ca46
to
746091c
Compare
Refactored more generally and extracted some of the uglyness out into a function, this both avoids the double allocation and makes things more readable |
@bors try @rust-timer queue but I think this looks good to me -- presuming perf is still good after refactoring (as expected), r=me |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 746091c with merge 922d360035cc6fd56a30063435326ce1495ea99c... |
☀️ Try build successful - checks-actions |
Queued 922d360035cc6fd56a30063435326ce1495ea99c with parent 3b2c454, future comparison URL. |
Finished benchmarking commit (922d360035cc6fd56a30063435326ce1495ea99c): comparison url. Summary: This change led to very large relevant improvements 🎉 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. @bors rollup=never |
@Mark-Simulacrum perf seems to look good, but I believe I don't have perms to r= you |
@bors r+ |
📌 Commit 746091c has been approved by |
⌛ Testing commit 746091c with merge 3a744751d561e69b5e3e5468db5223ad04c81368... |
💥 Test timed out |
Is this a genuine failure or spurious? I'm not terribly great at reading Bors logs |
☀️ Test successful - checks-actions |
Finished benchmarking commit (a2a7683): comparison url. Summary: This change led to very large relevant improvements 🎉 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
…ion, r=cjgillot Restrict query recursion in `needs_significant_drop` Overly aggressive use of the query system to improve caching lead to query cycles and consequently ICEs. This patch fixes this by restricting the use of the query system as a cache to those cases where it is definitely correct. Closes rust-lang#92725 . This is essentially a revert of rust-lang#90845 for the significant drop case only. The general `needs_drop` still does the same thing. The hope is that this is enough to preserve the performance improvements of that PR while fixing the ICE. Should get a perf run to verify that this is the case. cc `@cjgillot`
As part of the changes in #90218 , the
adt_drop_tys
and friends code stopped recursing through the query system, meaning that intermediate computations did not get cached. This change adds the recursions back in without re-introducing any of the old issues.On local benchmarks this fixes the 5% regressions in #90504 ; the wg-grammar regressions didn't seem to move too much. I may take some time later to look into those.
Not sure who to request for review here, so will leave it up to whoever gets it.