-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Move HIR parenting information out of hir_owner #83114
Conversation
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit c7c7d09b0353f3497678ac8ec32cad918b81f837 with merge 2f4b1b626e8b2095543ef80fa81b59c78514040c... |
This comment has been minimized.
This comment has been minimized.
☀️ Try build successful - checks-actions |
Queued 2f4b1b626e8b2095543ef80fa81b59c78514040c with parent 84c08f8, future comparison URL. |
Finished benchmarking try commit (2f4b1b626e8b2095543ef80fa81b59c78514040c): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
ec39552
to
aa95531
Compare
rustbot did not assign anybody. |
I think it's better to r? @michaelwoerister on this. |
☔ The latest upstream changes (presumably #83225) made this pull request unmergeable. Please resolve the merge conflicts. |
/// Gives access to the HIR node's parent for the HIR owner `key`. | ||
/// | ||
/// This can be conveniently accessed by methods on `tcx.hir()`. | ||
/// Avoid calling this query directly. | ||
query hir_owner_parent(key: LocalDefId) -> hir::HirId { | ||
eval_always | ||
desc { |tcx| "HIR parent of `{}`", tcx.def_path_str(key.to_def_id()) } |
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 seems fine to me, I think, if it's not a significant performance loss.
☔ The latest upstream changes (presumably #83424) made this pull request unmergeable. Please resolve the merge conflicts. |
8b8f666
to
6ee60e6
Compare
☔ The latest upstream changes (presumably #83185) made this pull request unmergeable. Please resolve the merge conflicts. |
b56c313
to
beea995
Compare
☔ The latest upstream changes (presumably #84233) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
r=me (not 100% on the incremental aspects, but it looks like the bulk of the changes account for the reshuffling of the data representation, and shouldn't change behavior outside of increasing incremental precision)
@bors r=eddyb |
📌 Commit d794cb0 has been approved by |
It looks like this is a regression on several benchmarks - is there anything that can be done about that? |
☀️ Test successful - checks-actions |
Oh sheesh, I completely missed that, sorry. Maybe nominate for discussion? I don't have a strong opinion, I just didn't see it. |
Store all HIR owners in the same container This replaces the previous storage in a BTreeMap for each of Item/ImplItem/TraitItem/ForeignItem. This should allow for a more compact storage. Based on rust-lang#83114
Store all HIR owners in the same container This replaces the previous storage in a BTreeMap for each of Item/ImplItem/TraitItem/ForeignItem. This should allow for a more compact storage. Based on rust-lang/rust#83114
Split out of #82681.
The parent of a HIR node and its content are currently bundled together, but are rarely used together.
This PR separates both information in two distinct queries for HIR owners.
This reduces incremental invalidation for HIR items that appear within a function body when this body (and the local ids) changes.