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

Remove the old copy propagation pass #77373

Merged
merged 1 commit into from
Oct 17, 2020
Merged

Remove the old copy propagation pass #77373

merged 1 commit into from
Oct 17, 2020

Conversation

jonas-schievink
Copy link
Contributor

This pass was added a long time ago, and has not really seen much improvement since (apart from some great work in #76569 that unfortunately ran into preexisting soundness issues). It is slow and unsound, and we now have a destination propagation pass that performs a related optimization and could be extended.

Closes #36673
Closes #73717
Closes #76740

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 30, 2020
@Mark-Simulacrum
Copy link
Member

You'll probably know better than me who a good reviewer here is - I don't have sufficient context I think, so I'll let you reassign.

@jonas-schievink
Copy link
Contributor Author

r? @oli-obk

@@ -472,7 +471,6 @@ fn run_optimization_passes<'tcx>(
&simplify_try::SimplifyArmIdentity,
&simplify_try::SimplifyBranchSame,
&dest_prop::DestinationPropagation,
&copy_prop::CopyPropagation,
&simplify_branches::SimplifyBranches::new("after-copy-prop"),
Copy link
Contributor

Choose a reason for hiding this comment

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

this should probably be renamed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed to "final"

@@ -1,39 +0,0 @@
// Check that CopyPropagation does not propagate an assignment to a function argument
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have tests for all of these situations for the dest-prop opt?

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 ported this test over, the results look correct

@oli-obk
Copy link
Contributor

oli-obk commented Oct 1, 2020

lgtm. r=me with nits resolved

@joshtriplett
Copy link
Member

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Oct 1, 2020

⌛ Trying commit 8aa1239de1c8daab86d44fdd93b5ed1f91369136 with merge f60f56e913fc86e229f05dff68d2853916dbf706...

@bors
Copy link
Contributor

bors commented Oct 1, 2020

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

@rust-timer
Copy link
Collaborator

Queued f60f56e913fc86e229f05dff68d2853916dbf706 with parent 3bbc443, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (f60f56e913fc86e229f05dff68d2853916dbf706): 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

@oli-obk
Copy link
Contributor

oli-obk commented Oct 1, 2020

@bors rollup-

@jonas-schievink
Copy link
Contributor Author

(the pass doesn't run by default, so there's no perf impact)

@camelid camelid added A-mir-opt Area: MIR optimizations C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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-review Status: Awaiting review from the assignee but also interested parties. labels Oct 16, 2020
@camelid
Copy link
Member

camelid commented Oct 16, 2020

@jonas-schievink Could you resolve the merge conflicts?

@camelid camelid added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 17, 2020
@oli-obk
Copy link
Contributor

oli-obk commented Oct 17, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Oct 17, 2020

📌 Commit dc31777 has been approved by oli-obk

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 17, 2020
@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 17, 2020
@bors
Copy link
Contributor

bors commented Oct 17, 2020

⌛ Testing commit dc31777 with merge ffeeb20...

@bors
Copy link
Contributor

bors commented Oct 17, 2020

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 17, 2020
@bors bors merged commit ffeeb20 into rust-lang:master Oct 17, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mir-opt Area: MIR optimizations C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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
9 participants