rust/compiler
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
..
rustc Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_abi Use {Decodable,Encodable}_NoContext in type_ir 2025-03-15 06:34:36 +00:00
rustc_arena Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_ast Rollup merge of #138754 - oli-obk:push-vtqtnwluyxop, r=compiler-errors 2025-03-21 06:56:49 +01:00
rustc_ast_ir Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_ast_lowering fix ICE #138415 2025-03-23 17:02:42 +09:00
rustc_ast_passes expand: Leave traces when expanding cfg_attr attributes 2025-03-17 15:58:25 +03:00
rustc_ast_pretty Auto merge of #138747 - matthiaskrgr:rollup-68x44rw, r=matthiaskrgr 2025-03-20 22:35:15 +00:00
rustc_attr_data_structures add rustc_macro_edition_2021 2025-03-19 17:37:35 +01:00
rustc_attr_parsing Rollup merge of #138717 - jdonszelmann:pin-macro, r=WaffleLapkin 2025-03-21 15:48:57 +01:00
rustc_baked_icu_data Add unreachable_pub to RUSTC_LINT_FLAGS for compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_borrowck Auto merge of #138719 - lcnr:concrete_opaque_types-closures, r=oli-obk 2025-03-22 06:55:52 +00:00
rustc_builtin_macros Rollup merge of #138627 - EnzymeAD:autodiff-cleanups, r=oli-obk 2025-03-21 15:48:55 +01:00
rustc_codegen_cranelift Update compiler-builtins to 0.1.152 2025-03-24 00:29:21 +00:00
rustc_codegen_gcc Remove implicit #[no_mangle] for #[rustc_std_internal_symbol] 2025-03-17 14:08:09 +00:00
rustc_codegen_llvm Auto merge of #133984 - DaniPopes:scmp-ucmp, r=scottmcm 2025-03-24 22:53:12 +00:00
rustc_codegen_ssa Auto merge of #136410 - saethlin:clean-up-cgu-internal-copy, r=compiler-errors 2025-03-25 06:36:41 +00:00
rustc_const_eval Rollup merge of #138713 - RalfJung:memory-hook-pointers, r=oli-obk 2025-03-21 06:56:47 +01:00
rustc_data_structures Use hashbrown from crates.io 2025-03-21 07:54:35 +01:00
rustc_driver Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_driver_impl Implement supported-crate-types print request 2025-03-23 19:08:54 +08:00
rustc_error_codes Rollup merge of #138364 - BLANKatGITHUB:compiler, r=RalfJung 2025-03-21 15:48:51 +01:00
rustc_error_messages Rollup merge of #138404 - bjorn3:sysroot_handling_cleanup, r=petrochenkov,jieyouxu 2025-03-13 11:28:35 +01:00
rustc_errors Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
rustc_expand expand: Do not report cfg_attr traces on macros as unused attributes 2025-03-21 18:25:29 +03:00
rustc_feature Rollup merge of #138717 - jdonszelmann:pin-macro, r=WaffleLapkin 2025-03-21 15:48:57 +01:00
rustc_fluent_macro Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_fs_util Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_graphviz Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_hashes Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_hir Auto merge of #136974 - m-ou-se:fmt-options-64-bit, r=scottmcm 2025-03-22 10:56:14 +00:00
rustc_hir_analysis Auto merge of #138719 - lcnr:concrete_opaque_types-closures, r=oli-obk 2025-03-22 06:55:52 +00:00
rustc_hir_pretty Use Option<Ident> for lowered param names. 2025-03-19 20:54:10 +11:00
rustc_hir_typeck Explicitly don't fold coroutine obligations in writeback 2025-03-23 18:34:33 +00:00
rustc_incremental Auto merge of #138629 - Zoxc:graph-anon-hashmap, r=oli-obk 2025-03-24 15:02:09 +00:00
rustc_index Use {Decodable,Encodable}_NoContext in type_ir 2025-03-15 06:34:36 +00:00
rustc_index_macros Add unreachable_pub to RUSTC_LINT_FLAGS for compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_infer Obligation::as_goal 2025-03-23 18:18:47 +00:00
rustc_interface Auto merge of #138629 - Zoxc:graph-anon-hashmap, r=oli-obk 2025-03-24 15:02:09 +00:00
rustc_lexer Revert "Rollup merge of #136355 - GuillaumeGomez:proc-macro_add_value_retrieval_methods, r=Amanieu" 2025-03-18 13:28:56 +01:00
rustc_lint Rollup merge of #138685 - nnethercote:use-Option-Ident-for-lowered-param-names, r=compiler-errors 2025-03-20 15:36:17 +01:00
rustc_lint_defs Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_llvm coverage: Add LLVM plumbing for expansion regions 2025-03-20 12:40:36 +11:00
rustc_log Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_macros Move codec module back into middle 2025-03-15 06:42:48 +00:00
rustc_metadata Rollup merge of #138685 - nnethercote:use-Option-Ident-for-lowered-param-names, r=compiler-errors 2025-03-20 15:36:17 +01:00
rustc_middle Auto merge of #136410 - saethlin:clean-up-cgu-internal-copy, r=compiler-errors 2025-03-25 06:36:41 +00:00
rustc_mir_build Rollup merge of #138821 - dianne:cleanup-non-scalar-compare, r=oli-obk 2025-03-24 20:40:08 +01:00
rustc_mir_dataflow Auto merge of #138414 - matthiaskrgr:rollup-9ablqdb, r=matthiaskrgr 2025-03-12 17:27:43 +00:00
rustc_mir_transform Rollup merge of #138670 - compiler-errors:remove-afidt, r=oli-obk 2025-03-19 08:17:18 +01:00
rustc_monomorphize Auto merge of #138414 - matthiaskrgr:rollup-9ablqdb, r=matthiaskrgr 2025-03-12 17:27:43 +00:00
rustc_next_trait_solver Do not rely on type_var_origin in OrphanCheckErr::NonLocalInputType 2025-03-20 02:17:14 +00:00
rustc_parse Auto merge of #138747 - matthiaskrgr:rollup-68x44rw, r=matthiaskrgr 2025-03-20 22:35:15 +00:00
rustc_parse_format Slim rustc_parse_format dependencies down 2025-03-23 07:30:18 +01:00
rustc_passes Rollup merge of #138786 - bjorn3:driver_code_move, r=compiler-errors 2025-03-22 21:34:39 +01:00
rustc_pattern_analysis Auto merge of #133889 - compiler-errors:inh-unstable, r=Nadrieril 2025-03-20 14:31:34 +00:00
rustc_privacy Auto merge of #138630 - matthiaskrgr:rollup-kk1gogr, r=matthiaskrgr 2025-03-18 05:58:46 +00:00
rustc_query_impl Auto merge of #138629 - Zoxc:graph-anon-hashmap, r=oli-obk 2025-03-24 15:02:09 +00:00
rustc_query_system Auto merge of #138629 - Zoxc:graph-anon-hashmap, r=oli-obk 2025-03-24 15:02:09 +00:00
rustc_resolve Rollup merge of #138882 - oli-obk:ast-lowering-mod-rib, r=fee1-dead 2025-03-24 20:40:10 +01:00
rustc_sanitizers Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_serialize Convert rustc_serialize integration tests to unit tests. 2025-03-20 08:59:50 +11:00
rustc_session Auto merge of #138629 - Zoxc:graph-anon-hashmap, r=oli-obk 2025-03-24 15:02:09 +00:00
rustc_smir Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_span Auto merge of #136974 - m-ou-se:fmt-options-64-bit, r=scottmcm 2025-03-22 10:56:14 +00:00
rustc_symbol_mangling Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_target target spec check: better error when llvm-floatabi is missing 2025-03-21 16:08:48 +01:00
rustc_trait_selection Obligation::as_goal 2025-03-23 18:18:47 +00:00
rustc_traits Rollup merge of #138394 - lcnr:yeet-variant, r=compiler-errors 2025-03-12 10:19:32 -07:00
rustc_transmute Add #[cfg(test)] for Transition in dfa 2025-03-18 07:17:16 +00:00
rustc_ty_utils Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_type_ir Remove STILL_FURTHER_SPECIALIZABLE special casing 2025-03-23 18:13:52 +00:00
rustc_type_ir_macros Fold visit into ty 2025-03-15 06:34:36 +00:00
stable_mir Rollup merge of #138536 - makai410:mut-mir-visitor, r=celinval 2025-03-22 11:59:17 +01:00