-
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
Generate metadata by iterating on DefId instead of traversing the HIR tree #80347
Conversation
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.
I like the idea, we definitely need to check perf and see how it fares, but I don't see actual problems with it. I still think it needs an MCP, can you open one so the compiler team knows about it? We have a meeting later today, so it should go fast. |
This comment has been minimized.
This comment has been minimized.
This is an interesting idea, and there are multiple factors in play here
|
I am also worried about this. This will definitely need a perf run.
I would like to drop the HIR earlier in the future. If this ever happens, HIR visiting will be impossible at such a late stage.
In the initial implementation, I wanted to use the query caches directly, like this:
However, this did not force the queries if the |
I filed an MCP. The Zulip discussion can be found here: |
@bors try @rust-timer queue |
Awaiting bors try build completion. |
⌛ Trying commit 5cdfe091c3363720dcd399d458ff4b317bf6f066 with merge 2e325a37b8ff6a4cce0abcacff6dc1b64a3cf624... |
☀️ Try build successful - checks-actions |
Queued 2e325a37b8ff6a4cce0abcacff6dc1b64a3cf624 with parent 30a4273, future comparison URL. @rustbot label: +S-waiting-on-perf |
Finished benchmarking try commit (2e325a37b8ff6a4cce0abcacff6dc1b64a3cf624): 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 |
Significant regressions of up to 50%. This is due to |
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue |
Awaiting bors try build completion. |
⌛ Trying commit 7ad4bee45bbafeae6ea1350d427bd22610062ae2 with merge 7ea7454bf3e5d01fd6f85df9620da4191ef48eaa... |
Iterate on DefId for variances and generics. Split from rust-lang#80347
☔ The latest upstream changes (presumably #75384) made this pull request unmergeable. Please resolve the merge conflicts. |
@cjgillot Ping from triage! There's merge conflicts now. |
@cjgillot What are the next steps here? Should I review this PR as-is? Or do you want to continue splitting this into separate PRs? |
@cjgillot Ping from triage, any updates on this? |
triage: @cjgillot What's the status of this? Does this PR need to be split up or do the merge conflicts just need to be fixed? |
Most of the work in metadata encoding consists in walking the HIR, and calling the different queries on each node.
This can be done by simply looping on all the DefIds, and invoking each query directly.
This requires to create non-panicking versions of some queries.
Papercuts:
fix polymorphize tests;def_kind
,entry_kind
andchildren
tables.