-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
incremental: refactor out non-query data from tcx #44137
Comments
Regarding |
…r=eddyb rustc: Remove `specialization_cache` in favor of a query This commit removes the `specialization_cache` field of `TyCtxt` by moving it to a dedicated query, which it turned out was already quite easily structured to do so! cc rust-lang#44137
Here are some other fields that look suspicious to me: list omitted and moved to the root of the issue Many of these follow the pattern of "maps produced by resolve that ought to be accessed via queries and ought not to be indexed by |
…r=eddyb rustc: Remove `specialization_cache` in favor of a query This commit removes the `specialization_cache` field of `TyCtxt` by moving it to a dedicated query, which it turned out was already quite easily structured to do so! cc rust-lang#44137
rustc: Remove the `used_unsafe` field on TyCtxt Now that lint levels are available for the entire compilation, this can be an entirely local lint in `effect.rs` cc #44137
The final item here is tracked by #42384, so closing in favor of that |
…, r=eddyb remove or encapsulate the remaining non-query data in tcx I wound up removing the existing cache around inhabitedness since it didn't seem to be adding much value. I reworked const rvalue promotion, but not that much (i.e., I did not split the computation into bits, as @eddyb had tossed out as a suggestion). But it's now demand driven, at least. cc @michaelwoerister -- see the `forbid_reads` change in last commit r? @eddyb -- since the trickiest of this PR is the work on const rvalue promotion cc #44137
There are various fields in the tcx of data that is not tracked for incremental compilation, or is tracked in an odd way. Here is a
partiallist:trait_map
of TyCtxt private #44162trait_map
of TyCtxt private #44162specialization_cache
in favor of a query #44157used_unsafe
field on TyCtxt #44195In each case, the idea would be to (at least to start) encapsulate the fields so that we are using queries to access those maps. I'll try to write up some mentoring instructions for each one later on.
cc @michaelwoerister
The text was updated successfully, but these errors were encountered: