Skip to content
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

Restore the local filter on mono item sorting #94505

Merged
merged 2 commits into from
Mar 3, 2022

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Mar 1, 2022

In CodegenUnit::items_in_deterministic_order, there's a comment that
only local HirIds should be taken into account, but #90408 removed the
as_local call that sets others to None. Restoring that check fixes the
s390x hangs seen in RHBZ 2058803.

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
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 1, 2022
@rust-highfive
Copy link
Collaborator

r? @jackh726

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 1, 2022
@jackh726
Copy link
Member

jackh726 commented Mar 1, 2022

r? rust-lang/compiler

@rust-highfive rust-highfive assigned davidtwco and unassigned jackh726 Mar 1, 2022
@cuviper
Copy link
Member Author

cuviper commented Mar 1, 2022

cc @cjgillot and @pierwill as the reviewer and author of #90408.

I'm honestly not sure how this could end up hanging LLVM, but it may have something to do with the comment, "The others don't matter for the codegen tests and can even make item order unstable." But it's quite possible that LLVM has its own bug that this just happened to trigger somehow.

I also don't really know why we only saw problems on s390x, but I did see that DefId has its field order dependent on target_endian, and s390x is our only big-endian target in Fedora.

@rust-log-analyzer

This comment was marked as resolved.

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable to me but I'd like a second opinion.

@davidtwco
Copy link
Member

r? rust-lang/compiler

@michaelwoerister
Copy link
Member

This looks good to me.

@bors r=michaelwoerister,davidtwco

Relying on the DefIndex as a proxy for definition order is pretty fishy to begin with.

@bors
Copy link
Contributor

bors commented Mar 2, 2022

📌 Commit 6a838e4 has been approved by michaelwoerister,davidtwco

@bors bors 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 Mar 2, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 2, 2022
…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
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 3, 2022
Rollup of 9 pull requests

Successful merges:

 - rust-lang#92061 (update char signess for openbsd)
 - rust-lang#93072 (Compatible variants suggestion with desugaring)
 - rust-lang#93354 (Add documentation about `BorrowedFd::to_owned`.)
 - rust-lang#93663 (Rename `BorrowedFd::borrow_raw_fd` to `BorrowedFd::borrow_raw`.)
 - rust-lang#94375 (Adt copy suggestions)
 - rust-lang#94433 (Improve allowness of the unexpected_cfgs lint)
 - rust-lang#94499 (Documentation was missed when demoting Windows XP to no_std only)
 - rust-lang#94505 (Restore the local filter on mono item sorting)
 - rust-lang#94529 (Unused doc comments blocks)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3e6abf0 into rust-lang:master Mar 3, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 3, 2022
@cuviper cuviper deleted the mono-item-sort-local branch April 12, 2022 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant 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.

9 participants