Uh oh!
There was an error while loading. Please reload this page.
Remove LocalDefId <-> HirId global maps - #89278
Conversation
rust-highfive
commented
Sep 26, 2021
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
rust-highfive
commented
Sep 26, 2021
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2ea6352 to
28329e9Compare
This comment has been minimized.
This comment has been minimized.
cjgillot
commented
Oct 19, 2021
cc @michaelwoerister since you reviewed #89124. |
cjgillot
commented
Oct 19, 2021
@bors try @rust-timer queue |
rust-timer
commented
Oct 19, 2021
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Oct 19, 2021
⌛ Trying commit e314d9902736731bde1bf07b455e2b62cbc93b57 with merge 9d51250e101ca95958b481c7c0e36210a39dabec... |
bors
commented
Oct 19, 2021
☀️ Try build successful - checks-actions |
rust-timer
commented
Oct 19, 2021
Queued 9d51250e101ca95958b481c7c0e36210a39dabec with parent 1af55d1, future comparison URL. |
rust-timer
commented
Oct 19, 2021
Finished benchmarking commit (9d51250e101ca95958b481c7c0e36210a39dabec): comparison url. Summary: This change led to very large relevant regressions 😿 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. 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 led to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never |
This comment has been minimized.
This comment has been minimized.
cjgillot
commented
Jan 29, 2022
@bors try @rust-timer queue |
rust-timer
commented
Jan 29, 2022
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Jan 29, 2022
⌛ Trying commit 6805235 with merge b3336bc040e749560ae2b328fc7bf69d5f9a17d8... |
rust-log-analyzer
commented
Jan 29, 2022
The job Click to see the possible cause of the failure (guessed by this bot) |
bors
commented
Jan 29, 2022
☀️ Try build successful - checks-actions |
1 similar comment
bors
commented
Jan 29, 2022
☀️ Try build successful - checks-actions |
rust-timer
commented
Jan 29, 2022
Queued b3336bc040e749560ae2b328fc7bf69d5f9a17d8 with parent d08e816, future comparison URL. |
rust-timer
commented
Jan 29, 2022
Finished benchmarking commit (b3336bc040e749560ae2b328fc7bf69d5f9a17d8): comparison url. Summary: This benchmark run shows 166 relevant regressions 😿 to instruction counts.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. 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 led to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never |
cjgillot
commented
Jan 29, 2022
Replaced by #93373. |
… r=oli-obk Store def_id_to_hir_id as variant in hir_owner. If hir_owner is Owner(_), the LocalDefId is pointing to an owner, so the ItemLocalId is 0. If the HIR node does not exist, we store Phantom. Otherwise, we store the HirId associated to the LocalDefId. Related to rust-lang#89278 r? `@oli-obk`
…, r=oli-obk Node id to hir id refactor Related to rust-lang#89278 r? `@oli-obk`
Based on #89124.The LocalDefId <-> HirId maps were globally accessed through
tcx.definitions. They are now encoded using the HIR queries.hir_owner_nodes(hir_id.owner), indexed byhir_id.local_id.local_def_idis an HIR owner, ie. ifhir_ownerisSome. Therefore, we use theNonecase to store the non-owningHirId.There is a special case with
usetrees, which can have a LocalDefId, which should be an HIR owner, but with no associated HIR data structure. In that case, we store the information like non-owning definitions.