Skip to content

Disable two mir opts that are known to be unsound #112834

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
Jun 21, 2023

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jun 20, 2023

closes #112460 (does not fix the underlying issue)

r? @cjgillot

@rustbot
Copy link
Collaborator

rustbot commented Jun 20, 2023

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

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 20, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jun 20, 2023

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@cjgillot
Copy link
Contributor

That's the safest solution indeed.
@bors r+ rollup=never

There is likely a perf effect, which reverses the one from #112040

@bors
Copy link
Collaborator

bors commented Jun 20, 2023

📌 Commit 8a482b37249f2d4d48c13fbc68eb8f26666190d5 has been approved by cjgillot

It is now in the queue for this repository.

@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 Jun 20, 2023
@@ -28,7 +28,7 @@ pub struct ConstGoto;

impl<'tcx> MirPass<'tcx> for ConstGoto {
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
sess.mir_opt_level() >= 2
sess.mir_opt_level() >= 2 && sess.opts.unstable_opts.unsound_mir_opts
Copy link
Member

Choose a reason for hiding this comment

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

Would be good to link to some form of explanation of what is unsound here.

@oli-obk oli-obk force-pushed the mir_opts_considered_unsound branch from 8a482b3 to 346078e Compare June 20, 2023 15:42
@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 20, 2023

@bors r=cjgillot

@bors
Copy link
Collaborator

bors commented Jun 20, 2023

📌 Commit 346078eb210462f34e95e4f8333c827ebf9a43be has been approved by cjgillot

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jun 21, 2023

⌛ Testing commit 346078eb210462f34e95e4f8333c827ebf9a43be with merge 8e9e75dfca891216eb4b90b49e750f3122cc7e9d...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Jun 21, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 21, 2023
@oli-obk oli-obk force-pushed the mir_opts_considered_unsound branch from 346078e to c409f05 Compare June 21, 2023 07:41
@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 21, 2023

@bors r=cjgillot

@bors
Copy link
Collaborator

bors commented Jun 21, 2023

📌 Commit c409f05 has been approved by cjgillot

It is now in the queue for this repository.

@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 Jun 21, 2023
@bors
Copy link
Collaborator

bors commented Jun 21, 2023

⌛ Testing commit c409f05 with merge 38b44eb...

@bors
Copy link
Collaborator

bors commented Jun 21, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing 38b44eb to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 21, 2023
@bors bors merged commit 38b44eb into rust-lang:master Jun 21, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 21, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (38b44eb): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.4% [0.3%, 0.9%] 48
Regressions ❌
(secondary)
0.5% [0.2%, 1.1%] 30
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.1%] 2
All ❌✅ (primary) 0.4% [0.3%, 0.9%] 48

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.8% [0.6%, 2.9%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.8% [0.6%, 2.9%] 3

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.8% [0.8%, 0.8%] 1
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.8% [0.8%, 0.8%] 1

Binary size

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.3%] 25
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 3
Improvements ✅
(primary)
-0.1% [-0.3%, -0.0%] 41
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 4
All ❌✅ (primary) -0.0% [-0.3%, 0.3%] 66

Bootstrap: 657.151s -> 659.034s (0.29%)

@rustbot rustbot added the perf-regression Performance regression. label Jun 21, 2023
@oli-obk oli-obk deleted the mir_opts_considered_unsound branch June 21, 2023 15:29
@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 21, 2023

This reverts the perf improvements from #112040 to fix a soundness bug

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jun 21, 2023
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. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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.

Neon miscompilation in stdarch tests with SeparateConstSwitch enabled
7 participants