-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 hir_id_to_def_id in OwnerInfo. #93301
Conversation
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 80132c3 with merge 2717408ef4fd9ac31b62252f88820ae21a15c5a8... |
☀️ Try build successful - checks-actions |
Queued 2717408ef4fd9ac31b62252f88820ae21a15c5a8 with parent 17dfae7, future comparison URL. |
Finished benchmarking commit (2717408ef4fd9ac31b62252f88820ae21a15c5a8): comparison url. Summary: This benchmark run shows 30 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 |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit a8ca8db17864e9a707c93103d3f9d5a13b44fa9f with merge b9dd0d7ae1f6f4c3c1a8764996ea9c608d131b90... |
Shouldn't this be rollup=never given that it is expected to have a perf effect? |
☀️ Try build successful - checks-actions |
Queued b9dd0d7ae1f6f4c3c1a8764996ea9c608d131b90 with parent 788b1fe, future comparison URL. |
Agreed, I was doing that based on not seeing any perf change with this last commit added. This PR is not really about perf but the particular commit included was part of a larger change that was giving some perf issues, we wanted to be sure that this commit was not part of the regression. |
a8ca8db
to
384189c
Compare
After perf run I've only added a commit that blesses some tests. |
Finished benchmarking commit (b9dd0d7ae1f6f4c3c1a8764996ea9c608d131b90): comparison url. Summary: This benchmark run shows 41 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 |
@bors rollup=never |
@rustbot label: +perf-regression-triaged The regression is expected and unavoidable. We call a query in
|
@bors r+ |
📌 Commit 384189c has been approved by |
hash_without_bodies: _, | ||
nodes: _, | ||
bodies: _, | ||
local_id_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.
Good idea! I think that skipping the hash for local_id_to_def_id
is safe, but the rationale definitely deserves a comment: all the information used to create a DefPathHash
exist within the HIR: the parent as the top node's LocalDefId
, it's DefPathData
as the node's ident and kind, and the disambiguator from the order in nodes
.
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 is your code, we just accidentally took it over and I didn't realize at all what was going on.
Since we require
x != y implies hash_stable(x) != hash_stable(y)
for stable hashing, but any info in local_id_to_def_id
is dependent on the body, then just hashing the body satisfies this condition.
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.
I did not intend to congratulate myself. Sorry for the impoliteness.
I just thought it was not obvious that any info in local_id_to_def_id
is dependent on the body, because the LocalDefId
s do not appear inside HIR. I'll probably end up adding the comment in another PR, no need to block this one.
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.
Oops I thought we added the comment. Yea, let's do it in a follow up
cc @spastorino
What's the difference with #89278? How did you manage to tame the regression? |
☀️ Test successful - checks-actions |
Finished benchmarking commit (6abb638): comparison url. Summary: This benchmark run shows 6 relevant improvements 🎉 but 25 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 |
@rustbot label: +perf-regression-triaged See #93301 (comment) |
This PR is just the first commit, we'll analyze the perf on the second big commit in isolation. Divide and conquer ^^ |
This is for perf test purposes only. Related to #89278