]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #43576 - arielb1:no-unneeded-unwind, r=eddyb
authorbors <bors@rust-lang.org>
Tue, 1 Aug 2017 22:43:15 +0000 (22:43 +0000)
committerbors <bors@rust-lang.org>
Tue, 1 Aug 2017 22:43:15 +0000 (22:43 +0000)
rustc_mir: don't build unused unwind cleanup blocks

When building a scope exit, don't build unwind cleanup blocks unless they will actually be used by the unwind path of a drop - the unused blocks are removed by SimplifyCfg, but they can cause a significant performance slowdown before they are removed. That fixes #43511.

Also a few other small MIR cleanups & optimizations.

r? @eddyb


Trivial merge