-
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
Remove PartialOrd
, Ord
from LocalDefId
#90408
Conversation
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
r? @cjgillot |
This comment has been minimized.
This comment has been minimized.
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.
Thanks for the PR @pierwill! I left a few comments.
Those trait bounds on LocalDefId
are used a lot, it may be easier to handle Idx
and PartialOrd/Ord
separately.
Changing data structures means we will have to be careful about perf implications.
LocalDefId
LocalDefId
Thanks for reviewing, @cjgillot! I'll work on just the ordering traits for now. I also might see if |
624198a
to
ae5bf6a
Compare
LocalDefId
PartialOrd
, Ord
from LocalDefId
Looks like rust/compiler/rustc_index/src/vec.rs Line 15 in 2b643e9
|
This comment has been minimized.
This comment has been minimized.
Remove `rustc_hir::hir_id::HirIdVec` See rust-lang#90408 (comment): > IIRC, `HirIdVec` is never used, you can delete it. PR rust-lang#72015 has been abandoned. r? `@cjgillot`
Remove `rustc_hir::hir_id::HirIdVec` See rust-lang#90408 (comment): > IIRC, `HirIdVec` is never used, you can delete it. PR rust-lang#72015 has been abandoned. r? `@cjgillot`
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.
39238b3
to
8b48d70
Compare
PartialOrd
, Ord
from LocalDefId
PartialOrd
, Ord
from LocalDefId
This comment has been minimized.
This comment has been minimized.
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.
Thanks @pierwill. I added a few nits. The main remark is that we'd like to remove the PartialOrd/Ord impl for HirId, since it has exactly the same issue as the impl for LocalDefId.
This comment has been minimized.
This comment has been minimized.
📌 Commit e6ff0ba has been approved by |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e983092): comparison url. Summary: This change led to large relevant mixed results 🤷 in compiler performance.
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 |
See previous comment here: #90408 (comment). @rustbot label: +perf-regression-triaged |
Remove some unused `Ord` derives based on `Span` Remove some `Ord`, `PartialOrd` derivations that rely on underlying ordering of `Span`. These ordering traits appear to be unused right now. If we're going to attempt to remove ordering traits from `Span` as suggested in rust-lang#90317 (comment), we might want to slowly remove code that depends on this ordering (as opposed to the all-at-once approach in rust-lang#90749 and rust-lang#90408). cc `@tmiasko` `@cjgillot`
…ywiser Use `indexmap` to avoid sorting `LocalDefId`s See discussion in rust-lang#90408 (comment). Related to work on rust-lang#90317.
In `CodegenUnit::items_in_deterministic_order`, there's a comment that only local HirIds should be taken into account, but rust-lang#90408 removed the `as_local` call that sets others to None. Restoring that check fixes the s390x hangs seen in [RHBZ 2058803]. [RHBZ 2058803]: https://bugzilla.redhat.com/show_bug.cgi?id=2058803
…haelwoerister,davidtwco Restore the local filter on mono item sorting In `CodegenUnit::items_in_deterministic_order`, there's a comment that only local HirIds should be taken into account, but rust-lang#90408 removed the `as_local` call that sets others to None. Restoring that check fixes the s390x hangs seen in [RHBZ 2058803]. [RHBZ 2058803]: https://bugzilla.redhat.com/show_bug.cgi?id=2058803
…haelwoerister,davidtwco Restore the local filter on mono item sorting In `CodegenUnit::items_in_deterministic_order`, there's a comment that only local HirIds should be taken into account, but rust-lang#90408 removed the `as_local` call that sets others to None. Restoring that check fixes the s390x hangs seen in [RHBZ 2058803]. [RHBZ 2058803]: https://bugzilla.redhat.com/show_bug.cgi?id=2058803
Part of work on #90317.