-
-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Reduce next-solver memory usage by interning CanonicalQueryInput #162031
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,8 +22,8 @@ use crate::{ | |
| InferConst, IntVid, Interner, TermKind, TyVid, TypingMode, Upcast, | ||
| }; | ||
|
|
||
| pub type CanonicalInput<I, T = <I as Interner>::Predicate> = | ||
| ty::CanonicalQueryInput<I, QueryInput<I, T>>; | ||
| pub type CanonicalInputData<I> = | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh wait, 🤔 want to instead do what we do for
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was a type alias before this whole PR too, then i made a wrapper around the type alias, then you reviewed asking if the wrapper needed to exist, i noticed it didn't, and removed it. kept the new name to not be ambiguous in other places, tho. |
||
| ty::CanonicalQueryInput<I, QueryInput<I, <I as Interner>::Predicate>>; | ||
| pub type CanonicalResponse<I> = Canonical<I, Response<I>>; | ||
| /// The result of evaluating a canonical query. | ||
| /// | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
that means you can remove the existing
QueryKey for (CanonicalQueryInput<'tcx, T>, bool)impls? 🤔View changes since the review
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.
No, they're generic over T, while the newly added ones are not. Removing them causes many errors.
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.
what other query takes a tuple involving
bool/usize? I do expect that we need the non-tuple one, but the other 2 surprise me