rust/compiler/rustc_metadata
bors 9bc8b00b4a Auto merge of #80718 - tmiasko:skip-opt-mir, r=oli-obk
Consistently avoid constructing optimized MIR when not doing codegen

The optimized MIR for closures is being encoded unconditionally, while
being unnecessary for cargo check. This turns out to be especially
costly with MIR inlining enabled, since it triggers computation of
optimized MIR for all callees that are being examined for inlining
purposes https://github.com/rust-lang/rust/pull/77307#issuecomment-751915450.

Skip encoding of optimized MIR for closures, enum constructors, struct
constructors, and trait fns when not doing codegen, like it is already
done for other items since 49433.
2021-01-13 17:48:41 +00:00
..
src Auto merge of #80718 - tmiasko:skip-opt-mir, r=oli-obk 2021-01-13 17:48:41 +00:00
Cargo.toml Don't query unstable data when staged_api is off 2020-09-13 02:10:39 +02:00