Skip to content

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Aug 21, 2025

r? compiler-errors

@rustbot
Copy link
Collaborator

rustbot commented Aug 21, 2025

compiler-errors is not on the review rotation at the moment.
They may take a while to respond.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Aug 21, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 21, 2025

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@lcnr
Copy link
Contributor Author

lcnr commented Aug 21, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Aug 21, 2025
fulfill: dedup newly added obligations
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 21, 2025
@rust-bors
Copy link

rust-bors bot commented Aug 21, 2025

☀️ Try build successful (CI)
Build commit: f5323d6 (f5323d6c2bfa0a3fc155c15d96de8434092b9a79, parent: 6ba0ce40941eee1ca02e9ba49c791ada5158747a)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f5323d6): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking 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 @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.4% [0.3%, 0.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-2.6%, -0.6%] 9
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.6%, secondary -1.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.4% [1.1%, 1.8%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
-1.8% [-1.8%, -1.8%] 1
All ❌✅ (primary) 0.6% [-1.1%, 1.8%] 3

Cycles

Results (secondary 2.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.5% [2.4%, 2.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 471.281s -> 471.144s (-0.03%)
Artifact size: 378.27 MiB -> 378.28 MiB (0.00%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Aug 21, 2025

#[derive(Default, Debug)]
struct ObligationStorage<'tcx> {
dedup: FxHashSet<(ty::ParamEnv<'tcx>, ty::Predicate<'tcx>)>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if ?0: Tr and ?1: Tr both get constrained to i32: Tr? Do we not dedup in that case?

@compiler-errors
Copy link
Member

r? BoxyUwU

@rustbot rustbot assigned BoxyUwU and unassigned compiler-errors Sep 14, 2025
impl<'tcx> ObligationStorage<'tcx> {
fn register(
fn register(&mut self, obligation: PredicateObligation<'tcx>) {
if self.dedup.insert((obligation.param_env, obligation.predicate)) {
Copy link
Member

@BoxyUwU BoxyUwU Sep 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this dedups stuff with different recursion depths which seems wrong. in general this makes me nervous that we'll have a sort of "cache" that doesnt take into account all the inputs. Why not FxHashSet<PredicateObligation<'tcx>> which is the exact type used for the list of obligations to prove? Is it just because of the cause?

@BoxyUwU BoxyUwU added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-no-work-capacity-tracking Status: Exempted from triagebot work capacity tracking. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 16, 2025
@bors
Copy link
Collaborator

bors commented Sep 18, 2025

☔ The latest upstream changes (presumably #145993) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. S-no-work-capacity-tracking Status: Exempted from triagebot work capacity tracking. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants