Repository navigation
MIR move elimination [4/6]: MoveElimination - #163338
Conversation
|
LLM disclosure: LLMs were used to generate the boilerplate for the MIR tests, but each test was manually reviewed and adjusted before committing. LLMs were also used to audit this pass against the rest of the compiler MIR transforms and Miri semantics. |
cdda80c to
3375722
Compare
9530f82 to
e61dd0d
Compare
e61dd0d to
bc0d0fa
Compare
|
This PR changes MIR cc @oli-obk, @RalfJung, @JakobDegen, @vakaras Some changes occurred in compiler/rustc_attr_parsing cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_attr_ir cc @jdonszelmann, @JonathanBrouwer Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt This PR changes rustc_public |
bc0d0fa to
785792f
Compare
This comment has been minimized.
This comment has been minimized.
785792f to
9ce4a67
Compare
This comment has been minimized.
This comment has been minimized.
|
Rebased on top of main which now contains #163337. This PR now only has the commits related to the main MoveElimination pass. |
94cd9f4 to
8cc3bd4
Compare
…ination, r=tmiasko MIR move elimination [4/6]: MoveElimination Depends on rust-lang#163336 and rust-lang#163337 This PR implements the `MoveElimination` pass from rust-lang/rfcs#3943. This pass uses the analysis results from `PreciseLiveness` to unify locals that are related by an assignment. This also includes an alias-fixup pass which is needed because some rvalues don't allow sources to overlap with the destination place. The pass is only enabled under `-Zmir-move-elimination`. This flag also disables `DestinationPropagation`, which is superseded by the new pass. r? tmiasko
…uwer Rollup of 15 pull requests Successful merges: - #163664 (Add new `RUSTC_BOOTSTRAP=-allow-unstable-compiler-flags` mode for testing stable compiler behavior in UI tests) - #163104 ([debuginfo] Emit `usize` and `isize` as typedefs) - #163338 (MIR move elimination [4/6]: MoveElimination) - #163701 (add ReadDir::dir to get the directory handle of the underlying directory) - #164488 (Don't try to skip anything in `Skip::advance_by(0)`) - #164611 (Improve bit permutation codegen) - #164612 (std: Combine `is_powerpc64_feature_detected` into `is_powerpc_feature_detected`) - #148842 (Avoid incorrect lifetime suggestion involving `sym::anon`) - #162668 (document that `!` does bitwise and logical negation) - #164264 (lint: suggest `fXX::is_nan` for unsuffixed NaN comparisons) - #164509 (layout invariant: turn delayed bug back into proper assertion) - #164540 (Minor optimizations around macro parsing) - #164594 (rustdoc: Correctly handle inner `deprecated` attribute on modules) - #164595 (Allow attributes in function trait parameters) - #164629 (arch::breakpoint: avoid confusing 'equivalent' terminology)
|
Found an issue with invalid projections. @bors r- |
|
This pull request was unapproved. |
|
This is a relatively minor issue that was only reachable in custom MIR, but essentially I had to extend the SIMD exclusion to also cover scalable vectors and |
|
@bors r+ |
…ination, r=tmiasko MIR move elimination [4/6]: MoveElimination Depends on rust-lang#163336 and rust-lang#163337 This PR implements the `MoveElimination` pass from rust-lang/rfcs#3943. This pass uses the analysis results from `PreciseLiveness` to unify locals that are related by an assignment. This also includes an alias-fixup pass which is needed because some rvalues don't allow sources to overlap with the destination place. The pass is only enabled under `-Zmir-move-elimination`. This flag also disables `DestinationPropagation`, which is superseded by the new pass. r? tmiasko
Rollup of 5 pull requests Successful merges: - #164672 (Bump `rustls-webpki` to 0.103.16 and `webpki-roots` to 1.0.10) - #163575 (core: Add examples and assembly tests for `abort_immediate`) - #163338 (MIR move elimination [4/6]: MoveElimination) - #163180 (Add more documentation for `chroot`, including an example and a manpage link) - #164638 (Make mir-opt blessing work again)
Rollup of 5 pull requests Successful merges: - #164672 (Bump `rustls-webpki` to 0.103.16 and `webpki-roots` to 1.0.10) - #163575 (core: Add examples and assembly tests for `abort_immediate`) - #163338 (MIR move elimination [4/6]: MoveElimination) - #163180 (Add more documentation for `chroot`, including an example and a manpage link) - #164638 (Make mir-opt blessing work again)
Rollup of 5 pull requests Successful merges: - #164672 (Bump `rustls-webpki` to 0.103.16 and `webpki-roots` to 1.0.10) - #163575 (core: Add examples and assembly tests for `abort_immediate`) - #163338 (MIR move elimination [4/6]: MoveElimination) - #163180 (Add more documentation for `chroot`, including an example and a manpage link) - #164638 (Make mir-opt blessing work again)
Rollup of 5 pull requests Successful merges: - #164672 (Bump `rustls-webpki` to 0.103.16 and `webpki-roots` to 1.0.10) - #163575 (core: Add examples and assembly tests for `abort_immediate`) - #163338 (MIR move elimination [4/6]: MoveElimination) - #163180 (Add more documentation for `chroot`, including an example and a manpage link) - #164638 (Make mir-opt blessing work again)
Rollup merge of #163338 - Amanieu:move-elimination/move-elimination, r=tmiasko MIR move elimination [4/6]: MoveElimination Depends on #163336 and #163337 This PR implements the `MoveElimination` pass from rust-lang/rfcs#3943. This pass uses the analysis results from `PreciseLiveness` to unify locals that are related by an assignment. This also includes an alias-fixup pass which is needed because some rvalues don't allow sources to overlap with the destination place. The pass is only enabled under `-Zmir-move-elimination`. This flag also disables `DestinationPropagation`, which is superseded by the new pass. r? tmiasko
Rollup of 5 pull requests Successful merges: - rust-lang/rust#164672 (Bump `rustls-webpki` to 0.103.16 and `webpki-roots` to 1.0.10) - rust-lang/rust#163575 (core: Add examples and assembly tests for `abort_immediate`) - rust-lang/rust#163338 (MIR move elimination [4/6]: MoveElimination) - rust-lang/rust#163180 (Add more documentation for `chroot`, including an example and a manpage link) - rust-lang/rust#164638 (Make mir-opt blessing work again)
Rollup of 5 pull requests Successful merges: - rust-lang/rust#164672 (Bump `rustls-webpki` to 0.103.16 and `webpki-roots` to 1.0.10) - rust-lang/rust#163575 (core: Add examples and assembly tests for `abort_immediate`) - rust-lang/rust#163338 (MIR move elimination [4/6]: MoveElimination) - rust-lang/rust#163180 (Add more documentation for `chroot`, including an example and a manpage link) - rust-lang/rust#164638 (Make mir-opt blessing work again)
Rollup of 5 pull requests Successful merges: - rust-lang/rust#164672 (Bump `rustls-webpki` to 0.103.16 and `webpki-roots` to 1.0.10) - rust-lang/rust#163575 (core: Add examples and assembly tests for `abort_immediate`) - rust-lang/rust#163338 (MIR move elimination [4/6]: MoveElimination) - rust-lang/rust#163180 (Add more documentation for `chroot`, including an example and a manpage link) - rust-lang/rust#164638 (Make mir-opt blessing work again)
…econstruction, r=tmiasko MIR move elimination [5/6]: Storage reconstruction Depends on rust-lang#163338 This PR extends the `MoveElimination` pass from rust-lang/rfcs#3943 to reconstruct `StorageLive`/`StorageDead` statements for all locals by using the liveness information collected by `PreciseLiveness`. r? tmiasko
…econstruction, r=tmiasko MIR move elimination [5/6]: Storage reconstruction Depends on rust-lang#163338 This PR extends the `MoveElimination` pass from rust-lang/rfcs#3943 to reconstruct `StorageLive`/`StorageDead` statements for all locals by using the liveness information collected by `PreciseLiveness`. r? tmiasko
Rollup merge of #163339 - Amanieu:move-elimination/storage-reconstruction, r=tmiasko MIR move elimination [5/6]: Storage reconstruction Depends on #163338 This PR extends the `MoveElimination` pass from rust-lang/rfcs#3943 to reconstruct `StorageLive`/`StorageDead` statements for all locals by using the liveness information collected by `PreciseLiveness`. r? tmiasko
View all comments
Depends on #163336 and #163337
This PR implements the
MoveEliminationpass from rust-lang/rfcs#3943.This pass uses the analysis results from
PreciseLivenessto unify locals that are related by an assignment. This also includes an alias-fixup pass which is needed because some rvalues don't allow sources to overlap with the destination place.The pass is only enabled under
-Zmir-move-elimination. This flag also disablesDestinationPropagation, which is superseded by the new pass.r? tmiasko