diff options
| author | bors <bors@rust-lang.org> | 2020-09-20 01:38:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-20 01:38:26 +0000 |
| commit | 255a4c58f5863ed41c2e68792799125c6c676575 (patch) | |
| tree | 07f3b9a5dccecda14b0b7f6e6579be0d615c5f73 /compiler/rustc_codegen_llvm/src | |
| parent | f68e08933d8f519a9655934fedebbc509661b219 (diff) | |
| parent | 2f9271b14c9ec0e5ed72ec91c2e24e850c580f83 (diff) | |
| download | rust-255a4c58f5863ed41c2e68792799125c6c676575.tar.gz rust-255a4c58f5863ed41c2e68792799125c6c676575.zip | |
Auto merge of #72632 - jonas-schievink:dest-prop, r=oli-obk
Implement a generic Destination Propagation optimization on MIR This takes the work that was originally started by `@eddyb` in https://github.com/rust-lang/rust/pull/47954, and then explored by me in https://github.com/rust-lang/rust/pull/71003, and implements it in a general (ie. not limited to acyclic CFGs) and dataflow-driven way (so that no additional infrastructure in rustc is needed). The pass is configured to run at `mir-opt-level=2` and higher only. To enable it by default, some followup work on it is still needed: * Performance needs to be evaluated. I did some light optimization work and tested against `tuple-stress`, which caused trouble in my last attempt, but didn't go much in depth here. * We can also enable the pass only at `opt-level=2` and higher, if it is too slow to run in debug mode, but fine when optimizations run anyways. * Debuginfo needs to be fixed after locals are merged. I did not look into what is required for this. * Live ranges of locals (aka `StorageLive` and `StorageDead`) are currently deleted. We either need to decide that this is fine, or if not, merge the variable's live ranges (or remove these statements entirely – https://github.com/rust-lang/rust/issues/68622). Some benchmarks of the pass were done in https://github.com/rust-lang/rust/pull/72635.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
