Repository navigation
Rip out old solver coherence - #161491
Rip out old solver coherence#161491
Conversation
|
Some changes occurred in src/tools/compiletest cc @jieyouxu
|
| selcx: &mut SelectionContext<'cx, 'tcx>, | ||
| #[instrument(level = "debug", skip(infcx), ret)] | ||
| fn impl_intersection_has_impossible_obligation<'a, 'tcx>( | ||
| infcx: &InferCtxt<'tcx>, |
There was a problem hiding this comment.
The selcx was only ever used with the old solver, hence we just pass the infcx directly now.
0ff5fec to
8b68f4a
Compare
|
cc @rust-lang/clippy
cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
8b68f4a to
e4cee54
Compare
This comment has been minimized.
This comment has been minimized.
2214e92 to
9f68a1b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
9f68a1b to
aa886b7
Compare
This comment has been minimized.
This comment has been minimized.
Rollup of 18 pull requests Successful merges: - #158102 (When compiling without a specified `--edition`, emit a message) - #162761 (Lower attributes for functions without bodies) - #163161 (implement FCW for `rustc_allowed_through_unstable_modules` items) - #163613 (Tweak the rendering of "not general enough" errors on the old trait solver) - #162062 (core: fix the docs of PanicInfo::location) - #163140 (document safety requirements for atomic intrinsics) - #163342 (Don't imply incorrect things about `Global` in the docs of `System`) - #163445 (Add safety comments for alloc::str) - #163503 (Mark Rc strong/weak count methods must_use) - #163548 (fs::set_permissions_nofollow: Android support, test cleanup) - #163585 ([triagebot] Create `debugger_visualizer` assign group) - #163597 (Add `SplitPathsRef` implementation for motor to make std build) - #163602 (Move media & home dirs tests to fs tests.) - #163667 (Finalize changes on expect messages for library/core/src/fmt/mod.rs) - #163682 ([rustdoc] Correctly link to (imported) enum variants with "jump to def") - #163683 (Fix GCC codegen backend comment in bootstrap) - #163703 (Move more `rustdoc-html tests` in the right location) - #163725 (some crashes fixed with next-solver) Failed merges: - #161491 (Rip out old solver coherence)
This comment has been minimized.
This comment has been minimized.
46d0705 to
3a7efa2
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors r=khyperia this time, surely. |
Rip out old solver coherence cc [#t-types/call-for-participation > rip out old solver coherence support](https://rust-lang.zulipchat.com/#narrow/channel/618216-t-types.2Fcall-for-participation/topic/rip.20out.20old.20solver.20coherence.20support/with/613938355) Probably best reviewed commit-by-commit with ignore-whitespace. rust-lang#160668 replaced the last remaining place where old solver was still used by default in coherence with new solver. This PR removes code that was only used during coherence by the old solver, so now new-solver coherence is the *only* way to do coherence. So we don't confuse users, passing `-Znext-solver=coherence` and `=no` now do the exact same thing. We also remove tracking intercrate ambiguity causes, since afaict the new solver uses a completely different path. Everything else is either removing code that is now unreachable, or removing a condition that is now always true. r? lcnr
…uwer Rollup of 6 pull requests Successful merges: - #161491 (Rip out old solver coherence) - #163223 (regression test for async handler normalization ICE) - #163653 (callconv: mips64: Match GCC for alignment of 16-byte scalars) - #163742 (Add the `movdir64b` and `movdiri` x86 target features) - #163752 (Revert "implement PartialEq<VecDeque<U>> for Vec<T>, &[T], &mut [T], [T; N], &[T; N] and &mut [T; N]") - #163755 (fix -Z track-diagnostics for errors and lints emitted from rustc_attr_parsing)
|
⌛ Testing commit 3a7efa2 with merge da0a774... Workflow: https://github.com/rust-lang/rust/actions/runs/37226905815 |
Rip out old solver coherence cc [#t-types/call-for-participation > rip out old solver coherence support](https://rust-lang.zulipchat.com/#narrow/channel/618216-t-types.2Fcall-for-participation/topic/rip.20out.20old.20solver.20coherence.20support/with/613938355) Probably best reviewed commit-by-commit with ignore-whitespace. #160668 replaced the last remaining place where old solver was still used by default in coherence with new solver. This PR removes code that was only used during coherence by the old solver, so now new-solver coherence is the *only* way to do coherence. So we don't confuse users, passing `-Znext-solver=coherence` and `=no` now do the exact same thing. We also remove tracking intercrate ambiguity causes, since afaict the new solver uses a completely different path. Everything else is either removing code that is now unreachable, or removing a condition that is now always true. r? lcnr
|
@bors yield |
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #163767. |
…uwer Rollup of 9 pull requests Successful merges: - #161491 (Rip out old solver coherence) - #163533 (Run cg_gcc tests with the correct compiler) - #163223 (regression test for async handler normalization ICE) - #163367 (simplify rustc_log a bit) - #163622 (x86: c-variadic functions don't use registers with `-Zregparm`) - #163653 (callconv: mips64: Match GCC for alignment of 16-byte scalars) - #163665 (Parser: Refactor & better document `should_continue_as_assoc_expr` & `can_continue_expr_unambiguously`) - #163742 (Add the `movdir64b` and `movdiri` x86 target features) - #163752 (Revert "implement PartialEq<VecDeque<U>> for Vec<T>, &[T], &mut [T], [T; N], &[T; N] and &mut [T; N]")
Rollup merge of #161491 - sjwang05:no-old-coherence, r=khyperia Rip out old solver coherence cc [#t-types/call-for-participation > rip out old solver coherence support](https://rust-lang.zulipchat.com/#narrow/channel/618216-t-types.2Fcall-for-participation/topic/rip.20out.20old.20solver.20coherence.20support/with/613938355) Probably best reviewed commit-by-commit with ignore-whitespace. #160668 replaced the last remaining place where old solver was still used by default in coherence with new solver. This PR removes code that was only used during coherence by the old solver, so now new-solver coherence is the *only* way to do coherence. So we don't confuse users, passing `-Znext-solver=coherence` and `=no` now do the exact same thing. We also remove tracking intercrate ambiguity causes, since afaict the new solver uses a completely different path. Everything else is either removing code that is now unreachable, or removing a condition that is now always true. r? lcnr
|
Note This PR was benchmarked as part of triage of its containing rollup: triage URL. Finished benchmarking commit (8e00340): comparison URL. Overall result: ❌ regressions - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesThis perf run didn't have relevant results for this metric. Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: missing data |
|
This seems to have caused a perf regression, any idea why? |
|
This looks like some kind of inlining difference to me, most of the diff comes from these two: Ir______________________________ function:file
> 157,186,026 (1670.7%, 1670.7%) <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation_no_cache:???
> -143,087,402 (-1520.8%, 149.8%) <rustc_trait_selection::traits::select::SelectionContext>::assemble_candidates_from_impls:???IIUC this touches some of the hot paths in obligation processing? |
|
The diff to
My guess would be inlining shenanigans too, my understanding is this PR doesn't change any behavior whatsoever - just nuking dead code, adding unreachable panics in unreachable places instead of continuing, etc. |
This could increase code size, as a panic, especially one with a format str arg, is more instructions than a continue. This makes inlining less likely and worsens cache effiency. |
View all comments
cc #t-types/call-for-participation > rip out old solver coherence support
Probably best reviewed commit-by-commit with ignore-whitespace.
#160668 replaced the last remaining place where old solver was still used by default in coherence with new solver. This PR removes code that was only used during coherence by the old solver, so now new-solver coherence is the only way to do coherence. So we don't confuse users, passing
-Znext-solver=coherenceand=nonow do the exact same thing.We also remove tracking intercrate ambiguity causes, since afaict the new solver uses a completely different path.
Everything else is either removing code that is now unreachable, or removing a condition that is now always true.
r? lcnr