Skip to content

Find the largest niche when computing layouts #50860

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

Merged
merged 1 commit into from
May 21, 2018

Conversation

nox
Copy link
Contributor

@nox nox commented May 18, 2018

Otherwise we end up with Option<Option<(&(), bool)>> unnecessarily large.

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(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 May 18, 2018
@@ -1674,40 +1685,56 @@ impl<'a, 'tcx, C> TyLayoutMethods<'tcx, C> for Ty<'tcx>
}
}

pub struct Niche {
Copy link
Member

Choose a reason for hiding this comment

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

Can this struct remain private, for now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Otherwise we end up with `Option<Option<(&(), bool)>>` unnecessarily large.
@nox nox force-pushed the big-niches-for-big-doggos- branch from fbba4d9 to b7db68f Compare May 18, 2018 12:32
@eddyb
Copy link
Member

eddyb commented May 18, 2018

@bors try

cc @Mark-Simulacrum @nikomatsakis We should try to figure out how expensive this might be (it could result in type traversals doing much more work, and adding caching is non-trivial in this case).

@bors
Copy link
Collaborator

bors commented May 18, 2018

⌛ Trying commit b7db68f with merge 3efc4382f7de39b68b475b09666347b27368ee3f...

@bors
Copy link
Collaborator

bors commented May 18, 2018

☀️ Test successful - status-travis
State: approved= try=True

@kennytm kennytm added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 18, 2018
@nikomatsakis
Copy link
Contributor

r? @eddyb

@rust-highfive rust-highfive assigned eddyb and unassigned nikomatsakis May 18, 2018
@Mark-Simulacrum
Copy link
Member

Perf queued.

@kennytm
Copy link
Member

kennytm commented May 20, 2018

Perf result is now available http://perf.rust-lang.org/compare.html?start=fd18d2537ddcffb24b3739393b085ed28dfc340e&end=3efc4382f7de39b68b475b09666347b27368ee3f&stat=instructions%3Au (stylo-servo's "clean incremental" result is spurious because of a hash table; all other results are within ±1.5%)

@kennytm kennytm removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 20, 2018
@nox
Copy link
Contributor Author

nox commented May 20, 2018

So this can land as is, right?

@bjorn3
Copy link
Member

bjorn3 commented May 20, 2018

Nice branch name 😄 🐶

@eddyb
Copy link
Member

eddyb commented May 20, 2018

@bors r+

@bors
Copy link
Collaborator

bors commented May 20, 2018

📌 Commit b7db68f has been approved by eddyb

@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 May 20, 2018
@bors
Copy link
Collaborator

bors commented May 21, 2018

⌛ Testing commit b7db68f with merge 1e508c4...

bors added a commit that referenced this pull request May 21, 2018
Find the largest niche when computing layouts

Otherwise we end up with `Option<Option<(&(), bool)>>` unnecessarily large.
@bors
Copy link
Collaborator

bors commented May 21, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: eddyb
Pushing 1e508c4 to master...

@bors bors merged commit b7db68f into rust-lang:master May 21, 2018
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants