mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-05 03:36:21 +00:00

Implement simple CopyPropagation based on SSA analysis This PR extracts the "copy propagation" logic from https://github.com/rust-lang/rust/pull/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.