-
Notifications
You must be signed in to change notification settings - Fork 13.4k
rustdoc: use the next solver for blanket impl synthesis #125907
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
base: master
Are you sure you want to change the base?
Conversation
@bors try @rust-timer queue |
This comment was marked as resolved.
This comment was marked as resolved.
I guess I'll also do a crater run 🤔? I don't want to accidentally make rustdoc hang or ice for half the ecosystem. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Let's try again. Bors, please respond this time around! @bors try @rust-timer queue |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@bors try |
…t, r=<try> rustdoc: use the next solver for blanket impl synthesis Furthermore use an `ObligationCtxt` instead of operating on an `InferCtxt` directly and don't drop the obligations generated by the type relating (fixes a FIXME). Originally I just wanted to submit the infcx→ocx change. However, that regressed `tests/rustdoc-ui/ice-blanket-impl-52873.rs` (pass→overflow error) because with `ocx.select_where_possible` we would no longer suppress / defatalize (canonical) overflow errors on the last obligation we register. CC rust-lang#54199 which introduced that special case. Obviously in the next solver overflows are non-fatal incl. `ice-blanket-impl-52873.rs`. Hence the switch now. Note that I wanted to hold off on switching to the new solver since it makes rust-lang#114891 go from long I-compiletime to I-compilemem + I-hang + eventual death by the OOM killer. So I don't know maybe we should block this PR on me finding a rustc reproducer for the rustdoc issue rust-lang#114891 (this is on my agenda) to be able to properly investigate the underlying next-solver issue.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (dcbecf2): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDBenchmarking 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 may lead 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 Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary 23.3%, secondary 5.2%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 824.6%, secondary 7.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 667.872s -> 669.107s (0.18%) |
okay lol, that is crazy |
…ket-impls, r=GuillaumeGomez rustdoc: add a regression test for a former blanket impl synthesis ICE Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering). r? rustdoc
…ket-impls, r=GuillaumeGomez rustdoc: add a regression test for a former blanket impl synthesis ICE Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering). r? rustdoc
…ket-impls, r=GuillaumeGomez rustdoc: add a regression test for a former blanket impl synthesis ICE Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering). r? rustdoc
…ket-impls, r=GuillaumeGomez rustdoc: add a regression test for a former blanket impl synthesis ICE Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering). r? rustdoc
…ket-impls, r=GuillaumeGomez rustdoc: add a regression test for a former blanket impl synthesis ICE Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering). r? rustdoc
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (9daeecb): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking 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 may lead 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 Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 5.1%, secondary -2.3%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 9.6%, secondary 4.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 780.385s -> 781.632s (0.16%) |
c32dd09
to
342a19d
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…t, r=<try> rustdoc: use the next solver for blanket impl synthesis Presumably due to better caching behavior, switching from the old to the next solver *drastically* improves the compile time on certain inputs. See rust-lang#114891. Fixes rust-lang#114891. Furthermore use an `ObligationCtxt` instead of operating on an `InferCtxt` directly and don't drop the obligations generated by the type relating. For context, originally I just wanted to submit the infcx→ocx change. However, that regressed `tests/rustdoc-ui/ice-blanket-impl-52873.rs` (pass→overflow error) because with `ocx.select_where_possible` we would no longer suppress / defatalize (canonical) overflow errors. CC rust-lang#54199 which introduced that special case. Obviously in the next solver overflows are non-fatal incl. `ice-blanket-impl-52873.rs`. Hence the switch now. https://github.com/rust-lang/rust/labels/S-blocked on perf improvements for the next solver.
we're gonna land 2 PRs significantly impacting perf in the near future, the perf will probably remain kinda meh until then |
no worries 😁 i am referring to #139762 and changing canonicalization to replace regions with universals in the root universe and then add a global cache to the canonicalizer for |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (620c855): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking 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 may lead 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 Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 3.1%, secondary 1.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 7.2%, secondary 4.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 775.789s -> 775.596s (-0.02%) |
Ping @fmease , would be nice to see perf now after those PRs optimizing the new trait solver were merged 😁 |
@bors2 try parent=c68340350c78eea402c4a85f8d9c1b7d3d607635 @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
rustdoc: use the next solver for blanket impl synthesis Presumably due to better caching behavior, switching from the old to the next solver *drastically* improves the compile time on certain inputs. See #114891. Fixes #114891. Furthermore use an `ObligationCtxt` instead of operating on an `InferCtxt` directly and don't drop the obligations generated by the type relating. For context, originally I just wanted to submit the infcx→ocx change. However, that regressed `tests/rustdoc-ui/ice-blanket-impl-52873.rs` (pass→overflow error) because with `ocx.select_where_possible` we would no longer suppress / defatalize (canonical) overflow errors. CC #54199 which introduced that special case. Obviously in the next solver overflows are non-fatal incl. `ice-blanket-impl-52873.rs`. Hence the switch now. https://github.com/rust-lang/rust/labels/S-blocked on perf improvements for the next solver.
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (e808137): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 5.5%, secondary -0.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 6.9%, secondary 1.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 693.444s -> 692.959s (-0.07%) |
recursion_depth: 0, | ||
param_env, | ||
predicate: impl_trait_ref.upcast(tcx), | ||
}); |
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.
why do we prove both the where-clauses of the impl and that the impl trait ref itself holds? I feel like one of the two is redundant
Interesting that |
Presumably due to better caching behavior, switching from the old to the next solver drastically improves the compile time on certain inputs. See #114891.
Fixes #114891.
Furthermore use an
ObligationCtxt
instead of operating on anInferCtxt
directly and don't drop the obligations generated by the type relating.For context, originally I just wanted to submit the infcx→ocx change. However, that regressed
tests/rustdoc-ui/ice-blanket-impl-52873.rs
(pass→overflow error) because withocx.select_where_possible
we would no longer suppress / defatalize (canonical) overflow errors. CC #54199 which introduced that special case. Obviously in the next solver overflows are non-fatal incl.ice-blanket-impl-52873.rs
. Hence the switch now.S-blockedStatus: Blocked on something else such as an RFC or other implementation work.
on perf improvements for the next solver.