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

Optimize RefCell read borrowing #62748

Merged
merged 3 commits into from
Jul 27, 2019

Conversation

luca-barbieri
Copy link
Contributor

Instead of doing two comparisons we can do only one with a bit of cleverness.

LLVM currently can't do this optimization itself on x86-64.

Instead of doing two comparisons we can do only one with a bit of
cleverness.

LLVM currently can't do this optimization itself on x86-64.
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @kennytm (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 17, 2019
@kennytm
Copy link
Member

kennytm commented Jul 19, 2019

r? @RalfJung

Implication of this change is too subtle for me to decide :)

@rust-highfive rust-highfive assigned RalfJung and unassigned kennytm Jul 19, 2019
@nikic
Copy link
Contributor

nikic commented Jul 19, 2019

I've reported https://bugs.llvm.org/show_bug.cgi?id=42691 for the optimization failure.

src/libcore/cell.rs Outdated Show resolved Hide resolved
src/libcore/cell.rs Outdated Show resolved Hide resolved
@RalfJung
Copy link
Member

Thanks, this looks right!

@bors r+

@bors
Copy link
Contributor

bors commented Jul 21, 2019

📌 Commit 44c1650 has been approved by RalfJung

@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 Jul 21, 2019
@Centril
Copy link
Contributor

Centril commented Jul 22, 2019

@bors rollup=never

@Centril
Copy link
Contributor

Centril commented Jul 24, 2019

@bors try

@bors
Copy link
Contributor

bors commented Jul 24, 2019

🙅 Please do not try after a pull request has been r+ed. If you need to try, unapprove (r-) it first.

@bors
Copy link
Contributor

bors commented Jul 27, 2019

⌛ Testing commit 44c1650 with merge 0e9b465...

bors added a commit that referenced this pull request Jul 27, 2019
Optimize RefCell read borrowing

Instead of doing two comparisons we can do only one with a bit of cleverness.

LLVM currently can't do this optimization itself on x86-64.
@bors
Copy link
Contributor

bors commented Jul 27, 2019

☀️ Test successful - checks-azure
Approved by: RalfJung
Pushing 0e9b465 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 27, 2019
@bors bors merged commit 44c1650 into rust-lang:master Jul 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

9 participants