Skip to content

Clean up some mir transform passes #75503

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 2 commits into from
Aug 14, 2020
Merged

Clean up some mir transform passes #75503

merged 2 commits into from
Aug 14, 2020

Conversation

JulianKnodt
Copy link
Contributor

@JulianKnodt JulianKnodt commented Aug 13, 2020

I noticed a few places where there were intermediates being created
in MIR optimization passes, so I removed them.

I also changed some Some(..) into just .. and wrap Some(..) at the function end, doing early returns for None.

I was generally looking for some easy optimizations in theses passes, and hopefully these should improve the runtime of these passes by a tinnnyyyyy bit.

r? @oli-obk

I noticed a few places where there were intermediates being created
in MIR optimization passes, so I removed them.
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 13, 2020
@JulianKnodt JulianKnodt force-pushed the opt_opt branch 2 times, most recently from 6405cf0 to 510c3ae Compare August 13, 2020 23:30
@JulianKnodt JulianKnodt marked this pull request as ready for review August 14, 2020 00:44
TerminatorKind::FalseUnwind { real_target, unwind }
if predicate(real_target) && unwind.map_or(true, &predicate) =>
{
TerminatorKind::Unreachable
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also added these, not sure if they're viable or not.

@JulianKnodt JulianKnodt force-pushed the opt_opt branch 2 times, most recently from baf7f1e to ff6bd95 Compare August 14, 2020 01:12
@JulianKnodt
Copy link
Contributor Author

JulianKnodt commented Aug 14, 2020

I realize this is a lot of changes, and I can split it into separate PRs, but curious whether this sort of change would be accepted.

(And also open to accepting in current form)

@JulianKnodt JulianKnodt force-pushed the opt_opt branch 2 times, most recently from f34c767 to 5e9d088 Compare August 14, 2020 07:32
@oli-obk
Copy link
Contributor

oli-obk commented Aug 14, 2020

@bors r+ rollup=never

Yea I don't think this'll have measurable perf implications, but let's not roll it up to be sure

@bors
Copy link
Collaborator

bors commented Aug 14, 2020

📌 Commit 5e9d088b23743145ee0b54557627f29f7ec962e3 has been approved by oli-obk

@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 14, 2020
@JulianKnodt
Copy link
Contributor Author

Ah I just pushed the change to convert from Vec to drain_filter, my bad

Also convert `uninhabited_enum_branching` `Cow<[u128]>::to_mut`
@oli-obk
Copy link
Contributor

oli-obk commented Aug 14, 2020

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 14, 2020

📌 Commit fd63bf7 has been approved by oli-obk

@bors
Copy link
Collaborator

bors commented Aug 14, 2020

⌛ Testing commit fd63bf7 with merge 6b2ca84...

@bors
Copy link
Collaborator

bors commented Aug 14, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: oli-obk
Pushing 6b2ca84 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 14, 2020
@bors bors merged commit 6b2ca84 into rust-lang:master Aug 14, 2020
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
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