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

incr.comp.: Fix HashStable for ty::RegionKind and trans item order #45176

Merged

Conversation

michaelwoerister
Copy link
Member

Fixes #45161 and the failing rust-icci tests.

r? @nikomatsakis

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

Seems fine. I left a question, but I'll r+ in the meantime.

// the codegen tests and can even make item order
// unstable.
InstanceDef::Item(def_id) => {
tcx.hir.as_local_node_id(def_id)
Copy link
Contributor

Choose a reason for hiding this comment

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

should we sort instead by def_id?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure that DefIds also reflect definition order. They probably do. This whole thing is a bit of a hack anyway. We could sort by Span...

Copy link
Contributor

Choose a reason for hiding this comment

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

DefIds do not reflect definition order, except in anonymous cases like impls. Otherwise, they would sort by name. Why do we care if these are reflect "definition order" per se?

Copy link
Member Author

Choose a reason for hiding this comment

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

I makes writing the codegen tests a lot more pleasant if you know in which order things will appear in LLVM IR. You could of course also run the compiler once to find out what the order is but that's another hurdle to writing such tests. Also the tests might break if we changed the details of our symbol mangling (which we've done quite a few times). What we have now is "OK" in comparison, I think.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Oct 10, 2017

📌 Commit 1235836 has been approved by nikomatsakis

@michaelwoerister
Copy link
Member Author

@bors p=1

Taking the liberty of bumping the priority of this since it will (hopefully) unbreak perf.rlo.

@bors
Copy link
Contributor

bors commented Oct 12, 2017

⌛ Testing commit 1235836 with merge 1807f27...

bors added a commit that referenced this pull request Oct 12, 2017
…er, r=nikomatsakis

incr.comp.: Fix HashStable for ty::RegionKind and trans item order

Fixes #45161 and the failing rust-icci tests.

r? @nikomatsakis
@bors
Copy link
Contributor

bors commented Oct 12, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 1807f27 to master...

@bors bors merged commit 1235836 into rust-lang:master Oct 12, 2017
@alexcrichton
Copy link
Member

@michaelwoerister @nikomatsakis the bootstrap compiler update has bounced I believe due to #45161 and I think this PR is not currently in beta. Any objections to backporting this?

@kennytm kennytm added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 19, 2017
@michaelwoerister
Copy link
Member Author

No objections.

@alexcrichton alexcrichton added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Oct 20, 2017
@alexcrichton alexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 20, 2017
bors added a commit that referenced this pull request Oct 20, 2017
[beta] Backport incremental compilation fix

This is a backport of #45176 along with a bump of the beta number so we can hopefully update the bootstrap compiler in #45285
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants