rust/compiler/rustc_codegen_ssa/src
bors d53f0b1d8e Auto merge of #123244 - Mark-Simulacrum:share-inline-never-generics, r=saethlin
Enable -Zshare-generics for inline(never) functions

This avoids inlining cross-crate generic items when possible that are
already marked inline(never), implying that the author is not intending
for the function to be inlined by callers. As such, having a local copy
may make it easier for LLVM to optimize but mostly just adds to binary
bloat and codegen time. In practice our benchmarks indicate this is
indeed a win for larger compilations, where the extra cost in dynamic
linking to these symbols is diminished compared to the advantages in
fewer copies that need optimizing in each binary.

It might also make sense it expand this with other heuristics (e.g.,
`#[cold]`) in the future, but this seems like a good starting point.

FWIW, I expect that doing cleanup in where we make the decision
what should/shouldn't be shared is also a good idea. Way too
much code needed to be tweaked to check this. But I'm hoping
to leave that for a follow-up PR rather than blocking this on it.
2024-11-28 21:44:34 +00:00
..
back Share inline(never) generics across crates 2024-11-28 13:43:05 -05:00
debuginfo use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00
mir reduce false positives of tail-expr-drop-order from consumed values 2024-11-20 20:53:11 +08:00
traits use intra-doc links for CodegenBackend::link 2024-11-27 18:42:14 -06:00
assert_module_sources.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
base.rs additional TypingEnv cleanups 2024-11-19 21:36:23 +01:00
codegen_attrs.rs add a test for target-feature-ABI warnings in closures 2024-11-24 09:20:10 +01:00
common.rs Test fixing raw-dylib 2024-09-24 10:10:31 -07:00
errors.rs Rollup merge of #131405 - davidtwco:hardcoded-strip-macos, r=jieyouxu,albertlarsan68 2024-11-05 23:43:56 +01:00
lib.rs Emit diagnostics for incorrect deployment targets 2024-11-01 17:07:19 +01:00
meth.rs compiler: Directly use rustc_abi in codegen 2024-11-03 12:30:32 -08:00
mono_item.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
size_of_val.rs compiler: Directly use rustc_abi in codegen 2024-11-03 12:30:32 -08:00
target_features.rs mark some target features as 'forbidden' so they cannot be (un)set 2024-11-04 22:56:47 +01:00