rust/compiler/rustc_middle/src/mir
bors 7d49ae9731 Auto merge of #136410 - saethlin:clean-up-cgu-internal-copy, r=compiler-errors
Remove InstanceKind::generates_cgu_internal_copy

This PR should not contain any behavior changes. Before this PR, the logic for selecting instantiation mode is spread across all of
* `instantiation_mode`
* `cross_crate_inlinable`
* `generates_cgu_internal_copy`
* `requires_inline`

The last two of those functions are not well-designed. The function that actually decides if we generate a CGU-internal copy is `instantiation_mode`, _not_ `generates_cgu_internal_copy`. The function `requires_inline` documents that it is about the LLVM `inline` attribute and that it is a hint. The LLVM attribute is called `inlinehint`, this function is also used by other codegen backends, and since it is part of instantiation mode selection it is *not* a hint.

The goal of this PR is to start cleaning up the logic into a sequence of checks that have a more logical flow and are easier to customize in the future (to do things like improve incrementality or improve optimizations without causing obscure linker errors because you forgot to update another part of the compiler).
2025-03-25 06:36:41 +00:00
..
interpret Move codec module back into middle 2025-03-15 06:42:48 +00:00
basic_blocks.rs Remove some unnecessary aliases from rustc_data_structures::sync 2025-03-03 20:20:24 +11:00
consts.rs Lower to a memset(undef) when Rvalue::Repeat repeats uninit 2025-03-19 23:57:49 -04:00
coverage.rs coverage: Don't store a body span in FunctionCoverageInfo 2025-03-18 23:18:24 +11:00
generic_graph.rs Simplify intra-crate qualifiers. 2025-02-11 14:59:13 +11:00
generic_graphviz.rs Simplify intra-crate qualifiers. 2025-02-11 14:59:13 +11:00
graphviz.rs Simplify intra-crate qualifiers. 2025-02-11 14:59:13 +11:00
mod.rs Build UserTypeProjections lazily when visiting bindings 2025-03-16 12:16:09 +11:00
mono.rs Auto merge of #136410 - saethlin:clean-up-cgu-internal-copy, r=compiler-errors 2025-03-25 06:36:41 +00:00
pretty.rs coverage: Don't store a body span in FunctionCoverageInfo 2025-03-18 23:18:24 +11:00
query.rs Squash fold into ty 2025-03-15 06:34:36 +00:00
statement.rs Fix the OperandRef type for NullOp::{UbChecks,ContractChecks} 2025-03-15 19:39:15 -07:00
syntax.rs Move impl blocks out of rustc_middle/src/mir/syntax.rs. 2025-02-24 09:16:10 +11:00
terminator.rs Implement #[define_opaque] attribute for functions. 2025-03-11 12:05:02 +00:00
traversal.rs Also simplify Preorder's size_hint 2025-03-03 21:07:55 -08:00
visit.rs Rollup merge of #137333 - compiler-errors:edition-2024-fresh, r=Nadrieril 2025-02-22 11:36:43 +01:00