]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #51660 - lqd:the-MIRnistry-of-walks, r=nikomatsakis
authorbors <bors@rust-lang.org>
Fri, 22 Jun 2018 08:34:26 +0000 (08:34 +0000)
committerbors <bors@rust-lang.org>
Fri, 22 Jun 2018 08:34:26 +0000 (08:34 +0000)
NLL: Walk the MIR only once for the "unused mut" lint

Turns the quadratic loop gathering local variable assignments into a single MIR walk, and brings down the number of `super_mir` calls generated from `do_mir_borrowck` to the expected levels seen in `nll::replace_regions_in_mir` and `nll::compute_regions`, i.e. on clap: 1883 `super_mir` calls instead of 8011.

The limited perf numbers I could gather on my machines look to be what we expected: `clap-check` seems to be gaining back a lot of the 7% we previously saw in `visit_mir`.

Fixes #51641.

r? @nikomatsakis


Trivial merge