rust/compiler
bors 255a4c58f5 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.
2020-09-20 01:38:26 +00:00
..
rustc just max_level_info 2020-09-11 09:37:51 -07:00
rustc_apfloat
rustc_arena Add bench_typed_arena_clear_100 bench 2020-09-18 05:52:45 +02:00
rustc_ast Auto merge of #76541 - matthiaskrgr:unstable_sort, r=davidtwco 2020-09-14 21:43:17 +00:00
rustc_ast_lowering Auto merge of #76541 - matthiaskrgr:unstable_sort, r=davidtwco 2020-09-14 21:43:17 +00:00
rustc_ast_passes Stabilize doc_alias feature 2020-09-14 11:03:47 +02:00
rustc_ast_pretty Fully integrate token collection for additional AST structs 2020-09-10 17:58:14 -04:00
rustc_attr
rustc_builtin_macros Attach tokens to ast::Stmt 2020-09-10 17:33:06 -04:00
rustc_codegen_llvm Rollup merge of #74787 - petrochenkov:rustllvm, r=cuviper 2020-09-09 21:02:24 -07:00
rustc_codegen_ssa use push(char) instead of push_str(&str) to add single chars to strings 2020-09-10 13:58:41 +02:00
rustc_data_structures Use T::BITS instead of size_of::<T> * 8. 2020-09-19 06:54:42 +02:00
rustc_driver just max_level_info 2020-09-11 09:37:51 -07:00
rustc_error_codes Adjust spelling 2020-09-15 18:10:41 +02:00
rustc_errors replacing sub's that can wrap by saturating_sub's 2020-09-11 11:11:11 +02:00
rustc_expand Rollup merge of #75146 - tmiasko:range-overflow, r=Mark-Simulacrum 2020-09-16 01:30:30 +02:00
rustc_feature Stabilize doc_alias feature 2020-09-14 11:03:47 +02:00
rustc_fs_util
rustc_graphviz Make graphviz font configurable 2020-09-16 08:10:06 -07:00
rustc_hir review, improve note span 2020-09-13 22:53:51 +02:00
rustc_hir_pretty
rustc_incremental
rustc_index
rustc_infer Auto merge of #72412 - VFLashM:issue-72408-nested-closures-exponential, r=tmandry 2020-09-18 14:08:39 +00:00
rustc_interface Attach tokens to ast::Stmt 2020-09-10 17:33:06 -04:00
rustc_lexer lexer: Tiny improvement to shebang detection 2020-09-02 00:40:19 +03:00
rustc_lint Rollup merge of #75099 - davidtwco:is-zst-abstraction-violation, r=eddyb 2020-09-19 11:47:34 +02:00
rustc_llvm Update cc crate to understand aarch64-apple-darwin with clang 2020-09-18 09:22:07 -04:00
rustc_macros Fix non-determinism in generated format string. 2020-09-09 21:23:25 +10:00
rustc_metadata support const_evaluatable_checked across crate boundaries 2020-09-18 17:11:34 +02:00
rustc_middle Rollup merge of #76636 - RalfJung:miri-size-assert, r=oli-obk 2020-09-19 11:47:49 +02:00
rustc_mir Auto merge of #72632 - jonas-schievink:dest-prop, r=oli-obk 2020-09-20 01:38:26 +00:00
rustc_mir_build Rollup merge of #76757 - matthiaskrgr:clippy_try_into, r=lcnr 2020-09-19 11:47:52 +02:00
rustc_parse improve diagnostics for lifetime after &mut 2020-09-15 10:36:06 -04:00
rustc_parse_format
rustc_passes allow concrete self types in consts 2020-09-13 22:53:51 +02:00
rustc_plugin_impl
rustc_privacy support const_evaluatable_checked across crate boundaries 2020-09-18 17:11:34 +02:00
rustc_query_system update the version of itertools and parking_lot 2020-09-12 08:26:53 +02:00
rustc_resolve Rollup merge of #76756 - matthiaskrgr:cl123ppy, r=Dylan-DPC 2020-09-16 12:24:17 -07:00
rustc_save_analysis use push(char) instead of push_str(&str) to add single chars to strings 2020-09-10 13:58:41 +02:00
rustc_serialize
rustc_session Rollup merge of #76794 - richkadel:graphviz-font, r=ecstatic-morse 2020-09-16 12:24:30 -07:00
rustc_span Rollup merge of #75304 - Aaron1011:feature/diag-deref-move-out, r=estebank 2020-09-16 01:30:32 +02:00
rustc_symbol_mangling Change ty.kind to a method 2020-09-04 17:47:51 +02:00
rustc_target librustc_target: Address comments 2020-09-14 17:43:06 -07:00
rustc_trait_selection Auto merge of #76886 - Aaron1011:fix/ensure-stack-predicate, r=Mark-Simulacrum 2020-09-19 09:21:22 +00:00
rustc_traits Rollup merge of #76641 - nox:pointee-random-stuff, r=eddyb 2020-09-16 08:25:00 +02:00
rustc_ty Remove def_id field from ParamEnv 2020-09-09 10:14:31 +02:00
rustc_typeck Rollup merge of #76749 - guswynn:hir_ranges, r=estebank 2020-09-19 11:47:50 +02:00