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

refactor writeback: emit normalization errors with new solver #118751

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Dec 8, 2023

implements #118725 (comment)

r? @compiler-errors @BoxyUwU whoever comes first n stuff

@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 Dec 8, 2023
@rustbot
Copy link
Collaborator

rustbot commented Dec 8, 2023

Some changes occurred to the core trait solver

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

@lcnr
Copy link
Contributor Author

lcnr commented Dec 8, 2023

@bors try @rust-timer queue

@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 Dec 8, 2023
@bors
Copy link
Contributor

bors commented Dec 8, 2023

⌛ Trying commit 84a6e68 with merge ed0e78e...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 8, 2023
refactor writeback: emit normalization errors with new solver

implements rust-lang#118725 (comment)

r? `@compiler-errors` `@BoxyUwU` whoever comes first n stuff
@bors
Copy link
Contributor

bors commented Dec 8, 2023

☀️ Try build successful - checks-actions
Build commit: ed0e78e (ed0e78e6d3430212e3a2ed7956d69aa74a77559f)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ed0e78e): comparison URL.

Overall result: ✅ improvements - 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 a highly reliable metric that was used to determine the overall result at the top of this comment.

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

Max RSS (memory usage)

Results

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.5% [2.5%, 2.5%] 1
Regressions ❌
(secondary)
2.1% [1.0%, 4.9%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.5% [2.5%, 2.5%] 1

Cycles

Results

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)
- - 0
Improvements ✅
(secondary)
-2.9% [-2.9%, -2.9%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 675.635s -> 675.44s (-0.03%)
Artifact size: 314.02 MiB -> 314.03 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 8, 2023
compiler/rustc_hir_typeck/src/writeback.rs Outdated Show resolved Hide resolved
@@ -283,8 +283,6 @@ fn typeck_with_fallback<'tcx>(

fcx.check_asms();

fcx.infcx.skip_region_resolution();
Copy link
Member

Choose a reason for hiding this comment

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

Hm... seems a bit sketch. Idk if I have any better ideas other than this though...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is fine.

We only did this to enable the use of fully_resolve in writeback to also resolve regions. But given that we resolve all regions to 'erased anyways, this is pretty pointless and resolve_vars_if_possible is good enough.

// promises. It is expected that we will have already reported any
// errors that may be encountered, so if the promises store an error,
// a dummy result is returned.
fn fold_predicate(&mut self, predicate: ty::Predicate<'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.

When do we resolve predicates during writeback?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Oh right

@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Dec 12, 2023

📌 Commit 0bea818 has been approved by compiler-errors

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-review Status: Awaiting review from the assignee but also interested parties. labels Dec 12, 2023
@bors
Copy link
Contributor

bors commented Dec 12, 2023

⌛ Testing commit 0bea818 with merge 835ed00...

@bors
Copy link
Contributor

bors commented Dec 12, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 835ed00 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 12, 2023
@bors bors merged commit 835ed00 into rust-lang:master Dec 12, 2023
12 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Dec 12, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (835ed00): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

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

Max RSS (memory usage)

Results

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)
1.1% [0.9%, 1.4%] 2
Regressions ❌
(secondary)
1.0% [1.0%, 1.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-2.8%, -2.6%] 2
All ❌✅ (primary) 1.1% [0.9%, 1.4%] 2

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: 673.136s -> 672.534s (-0.09%)
Artifact size: 312.33 MiB -> 312.27 MiB (-0.02%)

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

5 participants