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

revert mir inlining policy for beta-1.64 #101050

Merged
merged 3 commits into from
Aug 31, 2022

Conversation

pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Aug 26, 2022

revert mir inlining policy for beta-1.64

Fix #101004

@rustbot
Copy link
Collaborator

rustbot commented Aug 26, 2022

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rust-highfive
Copy link
Collaborator

r? @compiler-errors

(rust-highfive has picked a reviewer for you, use r? to override)

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 26, 2022
@rust-highfive
Copy link
Collaborator

⚠️ Warning ⚠️

  • Pull requests are usually filed against the master branch for this repo, but this one is against beta. Please double check that you specified the right target!

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 26, 2022
@pnkfelix
Copy link
Member Author

I had to locally disable src/test/codegen/mem-replace-direct-memcpy.rs to get my test suite to pass when trying this locally, regardless of whether I was testing stage 1 or stage 2. I assume this is because of #99619

@compiler-errors
Copy link
Member

@pnkfelix you might need to disable and/or bless mem-replace-direct-memcpy because it looks like it's angry on CI too.

r=me when CI is green though.

@rust-log-analyzer

This comment has been minimized.

@pnkfelix
Copy link
Member Author

@pnkfelix you might need to disable and/or bless mem-replace-direct-memcpy because it looks like it's angry on CI too.

r=me when CI is green though.

Yeah, I'm going to throw away that test on beta. It is just trying to ensure that the stdlib has no inefficient intermediate calls starting from core::ptr::read

@eddyb
Copy link
Member

eddyb commented Aug 26, 2022

Yeah, I'm going to throw away that test on beta.

You can just revert the MIR inlining PR. It changes the test just like many other tests because it gets inlined now, I don't see how all the other changed tests could pass.

(Oh, wait, I see, some of them just got -Zinline-mir=no, which didn't require changing the test itself, only the ones where -Zinline-mir=no wasn't sufficient, because the optimizations had happened in libcore itself, are the issue)

Still, I would try using git revert or at least copying the old version of the test (pre-MIR-inlining), if for no other reason than to have an extra layer of confirming it's actually getting back to the previous state.

@pnkfelix
Copy link
Member Author

@eddyb I'll do that as a follow-up activity, for now I just want to get this in. (note that we're not making this change on nightly, just on beta, so I would argue that there is very little risk of this performance regression leaking back in.. but still, I can put a little time into it next week.)

@pnkfelix
Copy link
Member Author

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented Aug 27, 2022

📌 Commit 2741dd8 has been approved by compiler-errors

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 Aug 27, 2022
@eddyb
Copy link
Member

eddyb commented Aug 27, 2022

so I would argue that there is very little risk of this performance regression leaking back in

IIRC it's not even a performance regression, I think Rust-GPU needed to avoid some dynamism in terms of memcpy lengths (and we pick our nightlies so no need to worry about that).

The main thing I wanted to express is that if the goal is to "disable MIR inlining" and the only test that appears to observe that difference is this one, it should be reverted so that it can act as a "canary" for MIR inlining being disabled.

(I would even prefer if it wasn't this test, but it seems that most codegen tests just disable MIR optimizations now, which makes some sense but it's suboptimal for actually testing, well, MIR inlining, or other MIR optimizations)

@eddyb
Copy link
Member

eddyb commented Aug 27, 2022

@bors r- (more testing was brought up in Zulip PM, taking it out of the queue for now)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 27, 2022
Copy link
Member

@eddyb eddyb left a comment

Choose a reason for hiding this comment

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

At the very least it would be good to include this reduction as a test:

Oh and maybe some of this will pass on beta? (But I'm not sure what the status is)

@pnkfelix
Copy link
Member Author

Yes I plan to at least add the test from #100550, and perhaps also try to adapt the one from #100476

@pnkfelix
Copy link
Member Author

pnkfelix commented Aug 29, 2022

@eddyb wrote:

Oh and maybe some of this will pass on beta? (But I'm not sure what the status is)

As far as I can tell, the examples in that ticket are not relevant to (or at least are not exposed by) the change in MIR inlining policy...

@pnkfelix
Copy link
Member Author

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented Aug 29, 2022

📌 Commit 2f96703 has been approved by compiler-errors

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 29, 2022
@compiler-errors
Copy link
Member

@bors rollup=never

@wesleywiser
Copy link
Member

@bors p=1

Resolves P-critical issue in beta.

@bors
Copy link
Contributor

bors commented Aug 31, 2022

⌛ Testing commit 2f96703 with merge 1ec9b66...

@bors
Copy link
Contributor

bors commented Aug 31, 2022

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 1ec9b66 to beta...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 31, 2022
@bors bors merged commit 1ec9b66 into rust-lang:beta Aug 31, 2022
@rustbot rustbot added this to the 1.64.0 milestone Aug 31, 2022
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. 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.

8 participants