Skip to content
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

Properly deeply normalize in the next solver #136074

Merged
merged 4 commits into from
Feb 12, 2025

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jan 25, 2025

Turn deep normalization into a TypeOp. In the old solver, just dispatch to the Normalize type op, but in the new solver call deeply_normalize. I chose to separate it into a different type op b/c some normalization is a no-op in the new solver, so this distinguishes just the normalization we need for correctness.

Then use DeeplyNormalize in the callsites we used to be using a CustomTypeOp (for normalizing known type outlives obligations), and also use it to normalize function args and impl headers in the new solver.

Finally, use it to normalize signatures for WF checks in the new solver as well. This addresses rust-lang/trait-system-refactor-initiative#146.

@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@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. labels Jan 25, 2025
@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 25, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 25, 2025
…t-solver, r=<try>

Properly deeply normalize in the next solver

r? lcnr
@bors
Copy link
Contributor

bors commented Jan 25, 2025

⌛ Trying commit 0eab7b0 with merge 6fc8fbd...

@bors
Copy link
Contributor

bors commented Jan 26, 2025

☀️ Try build successful - checks-actions
Build commit: 6fc8fbd (6fc8fbd0fa10d80a9bfdbaec7ce076ac85e4c196)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6fc8fbd): comparison URL.

Overall result: ❌ regressions - no action needed

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 may lead to changes in compiler perf.

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

Instruction count

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.1%, secondary -3.4%)

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
-3.4% [-3.4%, -3.4%] 1
All ❌✅ (primary) -1.1% [-1.1%, -1.1%] 1

Cycles

Results (primary 2.2%, secondary 2.1%)

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.

mean range count
Regressions ❌
(primary)
2.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.2% [2.2%, 2.2%] 1

Binary size

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

Bootstrap: 771.158s -> 769.467s (-0.22%)
Artifact size: 325.82 MiB -> 325.81 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 26, 2025
@compiler-errors compiler-errors marked this pull request as ready for review January 27, 2025 21:44
@compiler-errors compiler-errors force-pushed the deeply-normalize-next-solver branch from 0eab7b0 to a5d2c7b Compare January 28, 2025 19:11
@bors
Copy link
Contributor

bors commented Jan 29, 2025

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

@compiler-errors compiler-errors force-pushed the deeply-normalize-next-solver branch from a5d2c7b to 6a391c6 Compare January 29, 2025 00:29
@lcnr
Copy link
Contributor

lcnr commented Jan 29, 2025

r=me once it's unblocked

@lcnr lcnr added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 29, 2025
@bors
Copy link
Contributor

bors commented Jan 30, 2025

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

@lcnr
Copy link
Contributor

lcnr commented Jan 31, 2025

please add a next-solver revision to tests/ui/implied-bounds/normalization.rs

@lcnr
Copy link
Contributor

lcnr commented Feb 11, 2025

@rustbot author

unblocked

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Feb 11, 2025
@compiler-errors compiler-errors force-pushed the deeply-normalize-next-solver branch from 6a391c6 to d5be3ba Compare February 11, 2025 19:24
@compiler-errors
Copy link
Member Author

@bors r=lcnr

@bors
Copy link
Contributor

bors commented Feb 11, 2025

📌 Commit d5be3ba has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 11, 2025
@bors
Copy link
Contributor

bors commented Feb 12, 2025

⌛ Testing commit d5be3ba with merge 672e3aa...

@bors
Copy link
Contributor

bors commented Feb 12, 2025

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing 672e3aa to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 12, 2025
@bors bors merged commit 672e3aa into rust-lang:master Feb 12, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 12, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (672e3aa): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (primary -6.2%, secondary -0.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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
-6.2% [-6.2%, -6.2%] 1
Improvements ✅
(secondary)
-3.6% [-3.6%, -3.6%] 1
All ❌✅ (primary) -6.2% [-6.2%, -6.2%] 1

Cycles

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

Binary size

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

Bootstrap: 786.952s -> 788.722s (0.22%)
Artifact size: 347.65 MiB -> 347.63 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants