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

Allow escaping bound vars during normalize_erasing_regions in new solver #113471

Merged
merged 2 commits into from
Jul 14, 2023

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jul 8, 2023

Add AllowEscapingBoundVars to deeply_normalize, and use it in the new solver in the query_normalize routine.

Ideally, we'd make all query_normalize calls handle pass in AllowEscapingBoundVars individually, because really the only query_normalize call that needs AllowEscapingBoundVars::Yes is the one in try_normalize_generic_arg_after_erasing_regions, but I think that's kind of overkill. I am happy to be convinced otherwise, though.

r? @lcnr

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

rustbot commented Jul 8, 2023

Some changes occurred to the core trait solver

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

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

this feels a bit meh as AllowEscapingBoundVars should really be contained to fn query_normalize I think, would the following work:

  • add deeply_normalize_with_skipped_universes which takes a Vec<Option<UniverseIndex>> as argument.
  • rework fn query_normalize to first compute the skipped universes and then either use them as args to deeply_normalize or for the QueryNormalizer

@compiler-errors
Copy link
Member Author

Yeah that works.

@rust-cloud-vms rust-cloud-vms bot force-pushed the new-solver-norm-escaping branch from cd53aa0 to cef10c3 Compare July 13, 2023 18:26
@lcnr
Copy link
Contributor

lcnr commented Jul 14, 2023

@bors try @rust-timer queue

r=me after perf is green, iirc query_normalize is somewhat hot and moving this check might somehow hurt us?

@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 Jul 14, 2023
@bors
Copy link
Contributor

bors commented Jul 14, 2023

⌛ Trying commit 7cb69bac0cc10833ef65e41c3eaafdff9d6653c4 with merge a7f5f14571289eb2d96c1311ba51e7c30f11a1b7...

@bors
Copy link
Contributor

bors commented Jul 14, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a7f5f14571289eb2d96c1311ba51e7c30f11a1b7): comparison URL.

Overall result: no relevant changes - 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 benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

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

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: 658.307s -> 657.607s (-0.11%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 14, 2023
@rust-cloud-vms rust-cloud-vms bot force-pushed the new-solver-norm-escaping branch from 7cb69ba to 1ef85d8 Compare July 14, 2023 15:03
@compiler-errors
Copy link
Member Author

@bors r=lcnr

@bors
Copy link
Contributor

bors commented Jul 14, 2023

📌 Commit 1ef85d8 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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 14, 2023
@bors
Copy link
Contributor

bors commented Jul 14, 2023

⌛ Testing commit 1ef85d8 with merge ad96323...

@bors
Copy link
Contributor

bors commented Jul 14, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 14, 2023
@bors bors merged commit ad96323 into rust-lang:master Jul 14, 2023
@rustbot rustbot added this to the 1.73.0 milestone Jul 14, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ad96323): 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

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)
5.1% [3.7%, 6.5%] 2
Improvements ✅
(primary)
-2.0% [-2.0%, -2.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.0% [-2.0%, -2.0%] 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: 658.477s -> 657.64s (-0.13%)

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