]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #82980 - tmiasko:import-cold-multiplier, r=michaelwoerister
authorbors <bors@rust-lang.org>
Fri, 26 Mar 2021 11:57:44 +0000 (11:57 +0000)
committerbors <bors@rust-lang.org>
Fri, 26 Mar 2021 11:57:44 +0000 (11:57 +0000)
commite423058751a2b098d3e469a8e6df1b7a8bbd67b6
treea70b6b5716cd7627d14a1cbb6671047d702f1862
parent4137088d9da94f693b287f35e2b17782c0b1a283
parent1aee8083bec509ad290650209d0623db574609d3
Auto merge of #82980 - tmiasko:import-cold-multiplier, r=michaelwoerister

Import small cold functions

The Rust code is often written under an assumption that for generic
methods inline attribute is mostly unnecessary, since for optimized
builds using ThinLTO, a method will be code generated in at least one
CGU and available for import.

For example, deref implementations for Box, Vec, MutexGuard, and
MutexGuard are not currently marked as inline, neither is identity
implementation of From trait.

In PGO builds, when functions are determined to be cold, the default
multiplier of zero will stop the import, no matter how trivial the
implementation.

Increase slightly the default multiplier from 0 to 0.1.

r? `@ghost`
compiler/rustc_codegen_llvm/src/llvm_util.rs