-
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
Store def_id_to_hir_id as variant in hir_owner. #93373
Conversation
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.
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit a0bcce4 with merge a3bbefe418ea277c1fac331fbeeea5eb3db663dc... |
☀️ Try build successful - checks-actions |
Queued a3bbefe418ea277c1fac331fbeeea5eb3db663dc with parent 21b4a9c, future comparison URL. |
@bors retry |
⌛ Trying commit a0bcce4 with merge 59ef690361032d8c20d14ef3b2670082c06e207a... |
Finished benchmarking commit (a3bbefe418ea277c1fac331fbeeea5eb3db663dc): comparison url. Summary: This benchmark run shows 145 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 |
☀️ Try build successful - checks-actions |
a219d6c
to
a0bcce4
Compare
…ta on incr comp most of the time
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit d17eb78 with merge 3e36f8ea7f3c1c037ed81a875c73a0bc8429ec68... |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 5a299a9 with merge bf734e10c8724f96fadfd13736aea2bcf9ec3225... |
⌛ Trying commit bf1ca2e with merge dbcda59e03da05c3fd162aa12d5edfba54c9928c... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
☀️ Try build successful - checks-actions |
Queued dbcda59e03da05c3fd162aa12d5edfba54c9928c with parent 24ae996, future comparison URL. |
Finished benchmarking commit (dbcda59e03da05c3fd162aa12d5edfba54c9928c): comparison url. Summary: This benchmark run shows 152 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 we've been able to reduce the perf regression in non-clean builds significantly. I believe the problem was that the This has been fixed by changing There are still regressions (mostly in incremental clean builds), but I don't know how to avoid them... it seems the |
This is great! The perf is still bad, but I don't think there is anything more than query system overhead, is there?
I did not expect that. Does it come from queries call
I had excluded this possibility because of some old PR's perf result, but I guess I did not think it through.
|
I did not dig in the details further. But I do know of queries that do that, since they need the HirId for obligation causes
Yea, it looks exactly like that is the cause.
Yea that's what I was guessing, thanks for confirming. @bors r+ rollup=never |
📌 Commit bf1ca2e has been approved by |
CI is segfaulting, unrelated to this PR. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (24b8bb1): comparison url. Summary: This benchmark run shows 161 relevant regressions 😿 to instruction counts.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression |
Talked with @oli-obk and @spastorino about this here. The change in this PR (along with #93301) is needed to be able to make AST -> HIR lowering incremental (as a part of the general move towards more incremental compilation). This is achieved by removing a global untracked-by-incremental map that exists in @rustbot label: +perf-regression-triaged |
rustc: `hir().local_def_id_to_hir_id()` -> `tcx.local_def_id_to_hir_id()` cleanup Noticed this while working on rust-lang#118188. The history here is that the method was moved from HIR map to tcx in rust-lang#93373 as a part of incremental compilation work, so it's unlikely to go back.
rustc: `hir().local_def_id_to_hir_id()` -> `tcx.local_def_id_to_hir_id()` cleanup Noticed this while working on rust-lang/rust#118188. The history here is that the method was moved from HIR map to tcx in rust-lang/rust#93373 as a part of incremental compilation work, so it's unlikely to go back.
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 #89278
r? @oli-obk