-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Avoid a scrape_region_constraints and instead register the region constraints directly #123669
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment has been minimized.
This comment has been minimized.
Avoid a scrape_region_constraints and instead register the region constraints directly Should fix the perf regression from rust-lang#122077 (comment)
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (de35723): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking 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 Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 674.109s -> 672.163s (-0.29%) |
yay |
How does this fix the original issue that this scrape was added for? Didn't a bunch of crates ICE in crater? Did we ever minimize them down to UI tests? |
Oh, I see that it's equating the opaque manually... I wonder if that's sound wrt generalization. |
{ | ||
assert_eq!(alias_ty.args.len(), opaque_type_key.args.len()); | ||
for (key_arg, hidden_arg) in | ||
opaque_type_key.args.iter().zip(alias_ty.args.iter()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isnt taking into account variance is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, but that shouldn't matter here in practice, as all the args are either params or inference vars. Well, they should be. Unfortunately in the presence of erroneous code we may not have errored yet, as that only happens at the end of borrowck.
Yes ( |
kinda unsure about the subtleties of equating args when instantiating queries r? lcnr |
It feels like it adds a new (implicit) invariant to canonical goals. Want to think about how to make that more explicit. I think it's currently "you're allowed to use This sort of invariant feels non-trivial to me and I would like it to be more clearly laid out. Maybe we can also simplify it to always use a different equate and forbid using Would look more deeply into it once I am back from ETAPS and maybe chat in sync about this a bit |
To all: is this waiting on #120700 or other design? thanks |
I need to put in some thought into how to harden canonical goal result processing against doing things we don't want it to. I'd rather not rely on policy, but just hide the |
The perf impact has been meaningful, I am however fairly uncomfortable with merging this PR as stated above. With the new solver we'll likely want to perform pretty much all type-ops locally again as the new trait solver has a far better global cache. In this case keeping the outer If we were to go and lean into this |
…cx, r=<try> `ParamEnvAnd::fully_perform`: we have an `ocx`, use it cc rust-lang#123669 r? `@compiler-errors`
…-ocx, r=compiler-errors `ParamEnvAnd::fully_perform`: we have an `ocx`, use it cc rust-lang#123669 r? `@compiler-errors`
…-ocx, r=compiler-errors `ParamEnvAnd::fully_perform`: we have an `ocx`, use it cc rust-lang#123669 r? ``@compiler-errors``
Rollup merge of rust-lang#129078 - lcnr:scrape_region_constraints-use-ocx, r=compiler-errors `ParamEnvAnd::fully_perform`: we have an `ocx`, use it cc rust-lang#123669 r? ``@compiler-errors``
Should fix the perf regression from #122077 (comment)