Duration: 1h
Description:
RFC: rust-lang/rfcs#3943
Project goal: rust-lang/goals#396
The prototype implementation at rust-lang/rust#156046 shows promising results, with a 2-7% speedup on the compiler itself. However landing it is challenging because it changes the semantics of some MIR operations.
The session will start with an overview of the optimization and then dive into the potentially contentious topics:
- Assignments now allow overlapping source and destination as long as they are from different allocations.
- Moves of a whole local now effectively act as a StorageDead, meaning that any access to it is UB after the move (e.g. via raw pointers).
- The pass uses a liveness analysis that requires StorageDead on unwind paths to determine whether 2 locals are allowed to share the same address. These need to be preserved through most of the mir-opt pipeline.
- The pass deletes all storage statements and re-construct them from scratch from liveness information.
- Is DSE allowed to shrink the live range of locals?
- Impact on debuginfo statements (which only support a
Local instead of a Place for the destination).
- How the coroutine pass can take advantage of this optimization for smaller coroutines.
This session is of interest to @rust-lang/wg-mir-opt and @tmandry (for the impact on the coroutine transform).
Duration: 1h
Description:
RFC: rust-lang/rfcs#3943
Project goal: rust-lang/goals#396
The prototype implementation at rust-lang/rust#156046 shows promising results, with a 2-7% speedup on the compiler itself. However landing it is challenging because it changes the semantics of some MIR operations.
The session will start with an overview of the optimization and then dive into the potentially contentious topics:
Localinstead of aPlacefor the destination).This session is of interest to @rust-lang/wg-mir-opt and @tmandry (for the impact on the coroutine transform).