-
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
Perform HIR indexing per-owner #82681
Conversation
r? @lcnr (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.
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit fa3d6e006d3018be896bd1d3079831716535894c with merge f1126bb79abbc4fd7bd3c930d171bf9f0404a2ee... |
☀️ Try build successful - checks-actions |
Queued f1126bb79abbc4fd7bd3c930d171bf9f0404a2ee with parent 476acbf, future comparison URL. |
Finished benchmarking try commit (f1126bb79abbc4fd7bd3c930d171bf9f0404a2ee): 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 |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 85adc7842d1ec908a02627cb1648aede38aa1bd6 with merge 97823b8d6cd471a09fad9755d8f9ed30cd1f51f4... |
☀️ Try build successful - checks-actions |
Queued 97823b8d6cd471a09fad9755d8f9ed30cd1f51f4 with parent ec7f258, future comparison URL. |
Finished benchmarking try commit (97823b8d6cd471a09fad9755d8f9ed30cd1f51f4): 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 |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
) -> Option<IndexedHir<'hir>> { | ||
let item = *krate.owners.get(owner)?.as_ref()?; | ||
let hash = hash_body(&mut hcx, item); | ||
let mut nodes = IndexVec::new(); |
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.
let mut nodes = IndexVec::new(); | |
let mut nodes = IndexVec::with_capacity(1); |
Similar thing here
rust/compiler/rustc_middle/src/hir/map/collector.rs
Lines 108 to 109 in e7f7fe4
let mut nodes = IndexVec::new(); | |
nodes.push(Some(ParentedNode { parent: ItemLocalId::new(0), node: node.into() })); |
But i don't think this will give observable results, really.
this is no longer blocked, as the PR is merged |
☔ The latest upstream changes (presumably #88019) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 7e7e7366c524aca8fd4a4a2d9455de438fc42338 with merge 5e429138294dd111c5314026c1f7def4a17b02e4... |
☀️ Try build successful - checks-actions |
Queued 5e429138294dd111c5314026c1f7def4a17b02e4 with parent 05cccdc, future comparison URL. |
Finished benchmarking try commit (5e429138294dd111c5314026c1f7def4a17b02e4): comparison url. Summary: ERROR categorizing benchmark run! Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. @bors rollup=never |
☔ The latest upstream changes (presumably #88435) made this pull request unmergeable. Please resolve the merge conflicts. |
They depend on `hir_crate` and `index_hir`.
ea056fe
to
b5e35c8
Compare
☔ The latest upstream changes (presumably #88703) made this pull request unmergeable. Please resolve the merge conflicts. |
Closing in favour of #89124 |
The aim is to have HIR indexing more fine-grained, and to perform it for each HIR owner independently.
The subtle part is to find an owner's parent HirId.
The first few commits make it so that an owner's parent's owner is given by def_key.parent.
Then, we just need to record the nested owners inside
index_hir
to find the right local id.