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

Prevent miscompilation in trivial loop {} #77972

Merged
merged 1 commit into from
Oct 16, 2020

Conversation

Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented Oct 15, 2020

Ideally, we would want to handle a broader set of cases to fully fix the
underlying bug here. That is currently relatively expensive at compile and
runtime, so we don't do that for now.

Performance results indicate this is not a major regression, if at all, so it should be safe to land.

cc #28728

Ideally, we would want to handle a broader set of cases to fully fix the
underlying bug here. That is currently relatively expensive at compile and
runtime, so we don't do that for now.
@Mark-Simulacrum Mark-Simulacrum self-assigned this Oct 15, 2020
@Mark-Simulacrum
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Oct 15, 2020

⌛ Trying commit e2efec8 with merge b6bc5e04aa420f81b5241f406c9ef4e2e07dd8d1...

@bors
Copy link
Contributor

bors commented Oct 15, 2020

☀️ Try build successful - checks-actions, checks-azure
Build commit: b6bc5e04aa420f81b5241f406c9ef4e2e07dd8d1 (b6bc5e04aa420f81b5241f406c9ef4e2e07dd8d1)

@rust-timer
Copy link
Collaborator

Queued b6bc5e04aa420f81b5241f406c9ef4e2e07dd8d1 with parent 7f58716, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (b6bc5e04aa420f81b5241f406c9ef4e2e07dd8d1): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never

@Mark-Simulacrum
Copy link
Member Author

Okay, this seems to be performance neutral or non-regressing, at least. I am inclined to land it; let's try r? @nagisa perhaps?

This is definitely not a fix for #28728, of course, because empty loops are by far not the only ones that miscompile, but it seems like a clear win which we should take. I believe this likely means that in the commonly seen "intentional" cases at least people are likely to get the behavior they want, even if in general their code may break.

@nagisa
Copy link
Member

nagisa commented Oct 16, 2020

LGTM. Sounds like high impact, low-effort change to make. Even if it does not close out all of the non-progress related issues, it should help with the otherwise very common scenario.

@bors r+

@bors
Copy link
Contributor

bors commented Oct 16, 2020

📌 Commit e2efec8 has been approved by nagisa

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 16, 2020
@bors
Copy link
Contributor

bors commented Oct 16, 2020

⌛ Testing commit e2efec8 with merge a78a62f...

@bors
Copy link
Contributor

bors commented Oct 16, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: nagisa
Pushing a78a62f to master...

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.

5 participants