Skip to content

Remove PartialOrd, Ord from LocalDefId - #90408

Merged
bors merged 3 commits into
rust-lang:masterfrom
pierwill:untrack-localdefid-90317
Dec 23, 2021
Merged

Remove PartialOrd, Ord from LocalDefId#90408
bors merged 3 commits into
rust-lang:masterfrom
pierwill:untrack-localdefid-90317

Conversation

@pierwill

@pierwillpierwill commented Oct 29, 2021

Copy link
Copy Markdown
Contributor

Part of work on #90317.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @jackh726

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 29, 2021
@pierwill

Copy link
Copy Markdown
ContributorAuthor

r? @cjgillot

@rust-log-analyzer

This comment has been minimized.

@cjgillotcjgillot left a comment

Copy link
Copy Markdown
Contributor

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.

Comment threadcompiler/rustc_hir/src/definitions.rs Outdated
Comment threadcompiler/rustc_hir/src/definitions.rs Outdated
Comment threadcompiler/rustc_hir/src/hir.rs Outdated
Comment threadcompiler/rustc_hir/src/hir_id.rs Outdated
Comment threadcompiler/rustc_span/src/span_encoding.rs Outdated
@cjgillotcjgillot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 30, 2021
@pierwillpierwill changed the title [WIP] Remove PartialOrd, Ord, and Idx from LocalDefId[WIP] Remove PartialOrd, Ord from LocalDefIdOct 30, 2021
@pierwill

Copy link
Copy Markdown
ContributorAuthor

Those trait bounds on LocalDefId are used a lot, it may be easier to handle Idx and PartialOrd/Ord separately.

Thanks for reviewing, @cjgillot! I'll work on just the ordering traits for now. I also might see if DefId is easier to start with (#90317 (comment)).

@pierwill
pierwillforce-pushed the untrack-localdefid-90317 branch from 624198a to ae5bf6aCompareOctober 30, 2021 15:12
@pierwillpierwill changed the title [WIP] Remove PartialOrd, Ord from LocalDefId[WIP] Remove PartialOrd, Ord from LocalDefIdOct 30, 2021
@pierwill

pierwill commented Oct 30, 2021

Copy link
Copy Markdown
ContributorAuthor

Those trait bounds on LocalDefId are used a lot, it may be easier to handle Idx and PartialOrd/Ord separately.

Looks like Idx requires Ord...

pubtraitIdx:Copy + 'static + Ord + Debug + Hash{

@rust-log-analyzer

This comment has been minimized.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 31, 2021
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`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 1, 2021
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`
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@pierwill
pierwillforce-pushed the untrack-localdefid-90317 branch from 39238b3 to 8b48d70CompareNovember 2, 2021 18:39
@pierwillpierwill changed the title [WIP] Remove PartialOrd, Ord from LocalDefIdRemove PartialOrd, Ord from LocalDefIdNov 2, 2021
@rust-log-analyzer

This comment has been minimized.

@cjgillotcjgillot left a comment

Copy link
Copy Markdown
Contributor

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.

Comment threadcompiler/rustc_span/src/lib.rs Outdated
Comment threadcompiler/rustc_data_structures/src/graph/vec_graph/mod.rs Outdated
Comment threadcompiler/rustc_span/src/lib.rs Outdated
Comment threadcompiler/rustc_hir/src/hir_id.rs Outdated
@rust-log-analyzer

This comment has been minimized.

Comment threadcompiler/rustc_index/src/vec.rs
@pierwill

Copy link
Copy Markdown
ContributorAuthor

This change has been failing the same Windows backtrace test as #89836. We're assessing whether to bless the test or continue digging.

@pierwill
pierwillforce-pushed the untrack-localdefid-90317 branch from 439c33d to 46a508bCompareDecember 13, 2021 16:35
pierwill added a commit to pierwill/rust that referenced this pull request Dec 13, 2021
This has been causing failures in CI here and
in rust-lang#90408. A comment there
(rust-lang#90408 (comment))
suggested blessing the output; this commit does that manually.
@pierwill

Copy link
Copy Markdown
ContributorAuthor

Once #89836 is merged (🤞🤞), this should be ready to go. :)

@pierwill
pierwillforce-pushed the untrack-localdefid-90317 branch from 46a508b to f00fd59CompareDecember 16, 2021 05:20
@matthiaskrgr

Copy link
Copy Markdown
Member

Just for the record, the failure here #90408 (comment) is probably unrelated to this PR since it happened in other ci-runs as well :( : #91995 (comment)

Made a tracking ticket: #92000

@pierwill

pierwill commented Dec 16, 2021 via email

Copy link
Copy Markdown
ContributorAuthor

@bjorn3

Copy link
Copy Markdown
Member

@bors r=cjgillot

@bors

bors commented Dec 22, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit e6ff0ba has been approved by cjgillot

@bors

bors commented Dec 22, 2021

Copy link
Copy Markdown
Collaborator

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 22, 2021
@bors

bors commented Dec 22, 2021

Copy link
Copy Markdown
Collaborator

⌛ Testing commit e6ff0ba with merge e983092...

@bors

bors commented Dec 23, 2021

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing e983092 to master...

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (e983092): comparison url.

Summary: This change led to large relevant mixed results 🤷 in compiler performance.

  • Large improvement in instruction counts (up to -3.7% on full builds of deeply-nested-async)
  • Large regression in instruction counts (up to 2.9% on incr-unchanged builds of deeply-nested-async)

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-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression

@pierwill

Copy link
Copy Markdown
ContributorAuthor

See previous comment here: #90408 (comment).

@rustbot label: +perf-regression-triaged

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.perf-regressionPerformance regression.perf-regression-triagedThe performance regression has been triaged.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

13 participants

@pierwill@rust-highfive@rust-log-analyzer@bors@cjgillot@rust-timer@jyn514@Mark-Simulacrum@bjorn3@matthiaskrgr@apiraino@jackh726@rustbot