rust/src/librustc_data_structures
bors 49c36bf16f Auto merge of #36306 - nagisa:mir-local-cleanup, r=eddyb
A way to remove otherwise unused locals from MIR

There is a certain amount of desire for a pass which cleans up the provably unused variables (no assignments or reads). There has been an implementation of such pass by @scottcarr, and another (two!) implementations by me in my own dataflow efforts.

PR like https://github.com/rust-lang/rust/pull/35916 proves that this pass is useful even on its own, which is why I cherry-picked it out from my dataflow effort.

@nikomatsakis previously expressed concerns over this pass not seeming to be very cheap to run and therefore unsuitable for regular cleanup duties. Turns out, regular cleanup of local declarations is not at all necessary, at least now, because majority of passes simply do not (or should not) care about them. That’s why it is viable to only run this pass once (perhaps a few more times in the future?) per function, right before translation.

r? @eddyb or @nikomatsakis
2016-11-03 22:58:55 -07:00
..
control_flow_graph run rustfmt on control_flow_graph folder 2016-10-20 00:25:19 +05:30
graph run rustfmt on graph folder 2016-10-20 00:37:24 +05:30
obligation_forest Optimize ObligationForest's NodeState handling. 2016-11-02 13:37:10 +11:00
snapshot_map only remove keys that mention skolemized regions 2016-10-21 11:13:36 -04:00
unify run rustfmt on unify folder 2016-10-20 00:38:55 +05:30
veccell
accumulate_vec.rs Add AccumulateVec, a potentially stack-allocated vector. 2016-10-25 20:06:17 -06:00
array_vec.rs Add AccumulateVec, a potentially stack-allocated vector. 2016-10-25 20:06:17 -06:00
bitslice.rs Move IdxSetBuf and BitSlice to rustc_data_structures 2016-10-10 20:26:26 -04:00
bitvec.rs generalize BitMatrix to be NxM and not just NxN 2016-08-09 08:26:06 -04:00
blake2b.rs Replace all uses of SHA-256 with BLAKE2b. 2016-10-30 19:14:18 -04:00
Cargo.toml
flock.rs Add support for the Haiku operating system on x86 and x86_64 machines 2016-09-25 11:12:23 -05:00
fmt_wrap.rs Replace all uses of SHA-256 with BLAKE2b. 2016-10-30 19:14:18 -04:00
fnv.rs Documentation of what does for each type 2016-09-11 17:00:09 +05:30
indexed_set.rs Move IdxSetBuf and BitSlice to rustc_data_structures 2016-10-10 20:26:26 -04:00
indexed_vec.rs A way to remove otherwise unused locals from MIR 2016-11-03 06:17:01 +02:00
ivar.rs
lib.rs Replace all uses of SHA-256 with BLAKE2b. 2016-10-30 19:14:18 -04:00
snapshot_vec.rs
transitive_relation.rs generalize BitMatrix to be NxM and not just NxN 2016-08-09 08:26:06 -04:00
tuple_slice.rs