-Znext-solver Eager normalization outside of solver #155767
-Znext-solver Eager normalization outside of solver #155767rust-bors[bot] merged 6 commits intorust-lang:mainfrom
-Znext-solver Eager normalization outside of solver #155767Conversation
|
does this fix #151308 ? |
This comment has been minimized.
This comment has been minimized.
Yes, it probably fixes a bunch of issues. And unfix some issues fixed by the next solver? Unsure about that. |
34677fc to
e4b9746
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
`-Znext-solver` Eager normalization outside of solver
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (59cc905): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -2.5%, secondary -1.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 3.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 491.487s -> 483.564s (-1.61%) |
|
Better get some quick feedback before I go too far in wrong direction/details. r? lcnr |
| pub struct Normalized<'tcx, T> { | ||
| pub value: T, | ||
| pub obligations: PredicateObligations<'tcx>, | ||
| pub has_ambig_hr_alias: bool, |
There was a problem hiding this comment.
Currently unused. Unsure how to propagate it out to be accessed. Many normalization routines have T -> T signature.
There was a problem hiding this comment.
has_ambig_hr_aliasdoes not feel useful to me, I think we can avoid it entirely- given that we allow for infer vars in our type, we need to handle both
ty.has_aliasesandty.has_inferand need to shallow resolve at the start offold_tyandfold_const
I would very much like to merge deeply_normalize and this one. The fact that deeply_normalize eagerly errors feels like an impl detail to me.
Instead of doing evaluate_all_error_on_ambiguity_stall_coroutine_predicates at every normalize_alias_term, we should be able to just use try_evaluate_obligations there, and then have the normalize_error_on_ambiguity which takes all the currently pending goals. puts em into another fulfillment context, and does the current evaluate_all_error_on_ambiguity_stall_coroutine_predicates for all normalization goals at once.
e4b9746 to
6bd4abb
Compare
This comment has been minimized.
This comment has been minimized.
6bd4abb to
ffa59ce
Compare
2488143 to
03cabe7
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=lcnr rollup=never |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 20de910 (parent) -> a3e96d8 (this PR) Test differencesShow 96 test diffsStage 1
Stage 2
Additionally, 70 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard a3e96d8cb8a420022828d0a595277ad3671928a7 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
|
Finished benchmarking commit (a3e96d8): comparison URL. Overall result: ❌✅ regressions and improvements - 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)Results (primary -2.7%, secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 1.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 482.455s -> 498.188s (3.26%) |
|
non-next solver is mostly noise, the typenum regression is acceptable |
|
perf triage: Marking as triaged based on the comment above. Note that new solver is not enabled by default. Diesel regression looks maybe real to me, but it's very tiny so either way it seems like an acceptable trade-off for a step forward in this work. @rustbot label: +perf-regression-triaged |
move generalization test The forth test of rust-lang/trait-system-refactor-initiative#191 (comment) isn't actually related to closure signature inference. closes rust-lang/trait-system-refactor-initiative#191, which has already been fixed by rust-lang#155767 r? types
move generalization test The forth test of rust-lang/trait-system-refactor-initiative#191 (comment) isn't actually related to closure signature inference. closes rust-lang/trait-system-refactor-initiative#191, which has already been fixed by rust-lang#155767 r? types
move generalization test The forth test of rust-lang/trait-system-refactor-initiative#191 (comment) isn't actually related to closure signature inference. closes rust-lang/trait-system-refactor-initiative#191, which has already been fixed by rust-lang#155767 r? types
View all comments
This PR adds a normalization routine for the next solver that behaves the same as the normalization in the old solver.
The new routine is used to normalize eagerly outside of the next solver.
This is part 2 of modifying the next solver to support eager normalization.
Those test changes are mostly wording changes, duplicating some errors or reducing some duplicates. But I could have overlooked something.
Notably it fixes the first, third and fourth examples in rust-lang/trait-system-refactor-initiative#191, but not the second variant.
It's probably easier to review commit by commit.
Fixes #151308
Fixes #101557
Fixes #119692
Fixes #136859