Skip to content

Implement simple CopyPropagation based on SSA analysis#106908

Merged
bors merged 12 commits intorust-lang:masterfrom
cjgillot:copyprop-ssa
Jan 29, 2023
Merged

Implement simple CopyPropagation based on SSA analysis#106908
bors merged 12 commits intorust-lang:masterfrom
cjgillot:copyprop-ssa

Conversation

@cjgillot
Copy link
Copy Markdown
Contributor

This PR extracts the "copy propagation" logic from #106285.

MIR may produce chains of assignment between locals, like _x = move? _y.
This PR attempts to remove such chains by unifying locals.

The current implementation is a bit overzealous in turning moves into copies, and in removing storage statements.

Loading
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 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