mirror of
https://github.com/openharmony/third_party_rust_rust.git
synced 2026-07-19 19:53:38 -04:00
2a4b00beaa
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.