about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-11-03 22:58:55 -0700
committerGitHub <noreply@github.com>2016-11-03 22:58:55 -0700
commit49c36bf16f80a9d9d4e96172b1bc8cb7279de468 (patch)
treed45fc028bc95be0f72a19744ed6c535e20ec5216 /src/test/run-pass/thinlto
parentac919fcd9d4a958baf99b2f2ed5c3d38a2ebf9d0 (diff)
parent475236770fe4fd973957d734a074a54c5ac88c87 (diff)
downloadrust-49c36bf16f80a9d9d4e96172b1bc8cb7279de468.tar.gz
rust-49c36bf16f80a9d9d4e96172b1bc8cb7279de468.zip
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
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions