rust/compiler/rustc_mir_transform/src
bors a09fbe2c83 Auto merge of #145910 - saethlin:ignore-intrinsic-calls, r=cjgillot
Ignore intrinsic calls in cross-crate-inlining cost model

I noticed in a side project that a function which just compares to `[u64; 2]` for equality is not cross-crate-inlinable. That was surprising to me because I didn't think that code contained a function call, but of course our array comparisons are lowered to an intrinsic. Intrinsic calls don't make a function no longer a leaf, so it makes sense to add this as an exception to the "only leaves" cross-crate-inline heuristic.

This is the useful compare link: https://perf.rust-lang.org/compare.html?start=7cb1a81145a739c4fd858abe3c624ce8e6e5f9cd&end=c3f0a64dbf9fba4722dacf8e39d2fe00069c995e&stat=instructions%3Au because it disables CGU merging in both commits, so effects that cause changes in the sysroot to perturb partitioning downstream are excluded. Perturbations to what is and isn't cross-crate-inlinable in the sysroot has chaotic effects on what items are in which CGUs after merging. It looks like before this PR by sheer luck some of the CGUs dirtied by the patch in eza incr-unchanged happened to be merged together, and with this PR they are not.

The perf runs on this PR point to a nice runtime performance improvement.
2025-09-08 03:03:21 +00:00
..
coroutine Introduce MirDumper and MirWriter. 2025-09-01 09:19:03 +10:00
coverage remove couple of clones 2025-09-05 15:38:01 +02:00
inline Be a bit more careful around exotic cycles in in the inliner 2025-07-18 16:35:55 +00:00
shim mir: Use the new method for BasicBlockData 2025-06-29 20:39:13 +08:00
abort_unwinding_calls.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
add_call_guards.rs mir: Use the new method for BasicBlockData 2025-06-29 20:39:13 +08:00
add_moves_for_packed_drops.rs mir: Use the new method for BasicBlockData 2025-06-29 20:39:13 +08:00
add_retag.rs Remove Retag for Unique 2025-07-21 08:08:41 +00:00
add_subtyping_projections.rs Remove some unnecessary erases 2025-05-08 16:20:57 +00:00
check_alignment.rs mir: Add a new method to statement 2025-06-29 20:13:36 +08:00
check_call_recursion.rs Cleanup assoc parent utils 2025-08-13 09:33:09 -05:00
check_const_item_mutation.rs Only look at trait impls in the current crate when looking for Drop impls 2025-04-02 07:30:11 +00:00
check_enums.rs Fix ICE when validating transmuting ZST to inhabited enum 2025-08-23 19:25:58 +02:00
check_inline.rs coverage: Remove all unstable support for MC/DC instrumentation 2025-08-06 22:38:52 +10:00
check_inline_always_target_features.rs inline at the callsite & warn when target features mismatch 2025-08-27 14:45:01 +01:00
check_null.rs mir: Add a new method to statement 2025-06-29 20:13:36 +08:00
check_packed_ref.rs Cleanup assoc parent utils 2025-08-13 09:33:09 -05:00
check_pointers.rs mir: Use the new method for BasicBlockData 2025-06-29 20:39:13 +08:00
cleanup_post_borrowck.rs Visit place in BackwardIncompatibleDropHint statement 2025-04-13 22:01:54 +00:00
copy_prop.rs Leave from CopyProp early when there are no replacements 2025-06-22 14:30:23 +02:00
coroutine.rs Introduce MirDumper and MirWriter. 2025-09-01 09:19:03 +10:00
cost_checker.rs Allow more top-down inlining for single-BB callees 2025-03-12 22:39:43 -07:00
cross_crate_inline.rs Ignore intrinsic calls in cross-crate-inlining cost model 2025-09-05 20:44:49 -04:00
ctfe_limit.rs detect infinite recursion with tail calls in ctfe 2025-07-31 23:59:55 +02:00
dataflow_const_prop.rs Add InterpCx::layout_of with tracing, shadowing LayoutOf 2025-06-27 11:49:22 +02:00
dead_store_elimination.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
deduce_param_attrs.rs Remove obsolete comment from DeduceReadOnly 2025-03-04 12:26:01 +01:00
deref_separator.rs Move MirPatch from rustc_middle to rustc_mir_transform. 2025-02-14 16:15:57 +11:00
dest_prop.rs Use rustc_data_structures::union_find. 2025-09-07 16:46:34 +00:00
dump_mir.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
early_otherwise_branch.rs mir-opt: Do not create storage marks for temporary locals 2025-05-24 15:36:06 +08:00
elaborate_box_derefs.rs Move MirPatch from rustc_middle to rustc_mir_transform. 2025-02-14 16:15:57 +11:00
elaborate_drop.rs Rollup merge of #132748 - lolbinarycat:rustdoc-intra-doc-link-warn-more-54191, r=GuillaumeGomez 2025-08-02 11:24:20 +02:00
elaborate_drops.rs debug impls for drop elaborators 2025-07-18 17:31:48 -07:00
errors.rs inline at the callsite & warn when target features mismatch 2025-08-27 14:45:01 +01:00
ffi_unwind_calls.rs compiler: use is_rustic_abi in mir_transform 2025-03-04 18:21:56 -08:00
function_item_references.rs Rename ClearCrossCrate::assert_crate_local. 2025-02-21 07:12:13 +11:00
gvn.rs Auto merge of #146289 - cjgillot:gvn-aggregate, r=dianqk 2025-09-07 14:02:09 +00:00
impossible_predicates.rs Keep elaborating predicates. 2025-07-22 01:51:11 +00:00
inline.rs remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
instsimplify.rs Simplify align_of_val::<[T]>(…)align_of::<T>() 2025-07-28 23:19:06 -07:00
jump_threading.rs Add InterpCx::layout_of with tracing, shadowing LayoutOf 2025-06-27 11:49:22 +02:00
known_panics_lint.rs AsyncDrop implementation using shim codegen of async_drop_in_place::{closure}, scoped async drop added. 2025-04-28 16:23:13 +07:00
large_enums.rs extend allocbytes with associated type 2025-05-26 00:15:16 +02:00
lib.rs Rollup merge of #145932 - JamieCunliffe:target-feature-inlining, r=jackh726 2025-09-04 10:01:55 +10:00
lint.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
lint_tail_expr_drop_order.rs Use Itertools::all_equal_value() where applicable 2025-09-05 18:43:43 +00:00
lower_intrinsics.rs mir: Add a new method to statement 2025-06-29 20:13:36 +08:00
lower_slice_len.rs mir: Add a new method to statement 2025-06-29 20:13:36 +08:00
match_branches.rs mir-opt: Do not transform non-int type in match_branches 2025-05-26 18:15:54 +08:00
mentioned_items.rs Remove support for dyn* 2025-07-01 19:00:21 +00:00
multiple_return_terminators.rs In rustc_mir_tranform, iterate over index newtypes instead of ints 2025-04-12 11:53:07 +00:00
nrvo.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
pass_manager.rs Introduce MirDumper and MirWriter. 2025-09-01 09:19:03 +10:00
patch.rs mir: Use the new method for BasicBlockData 2025-06-29 20:39:13 +08:00
post_analysis_normalize.rs do not emit OpaqueCast projections with -Znext-solver 2025-04-17 12:15:04 +02:00
post_drop_elaboration.rs Make check_live_drops into a MirLint. 2024-09-10 09:11:17 +10:00
prettify.rs Use a closure instead of three chained iterators 2025-04-29 14:58:21 +00:00
promote_consts.rs use let chains in mir, resolve, target 2025-07-28 06:10:36 +05:00
ref_prop.rs Convert moves of references to copies in RefProp 2025-08-11 23:10:56 -04:00
remove_noop_landing_pads.rs use let chains in mir, resolve, target 2025-07-28 06:10:36 +05:00
remove_place_mention.rs Do not optimize out SwitchInt before borrowck, or if Zmir-preserve-ub 2025-04-08 21:05:20 +00:00
remove_storage_markers.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
remove_uninit_drops.rs Apply effects to otherwise edge in dataflow analysis 2025-07-08 18:15:05 -05:00
remove_unneeded_drops.rs Let RemoveUnneededDrops also remove drop_in_place 2025-08-04 23:54:39 -07:00
remove_zsts.rs AsyncDrop implementation using shim codegen of async_drop_in_place::{closure}, scoped async drop added. 2025-04-28 16:23:13 +07:00
required_consts.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
sanity_check.rs Move MirPass to rustc_mir_transform. 2024-09-03 16:03:46 +10:00
shim.rs Introduce MirDumper and MirWriter. 2025-09-01 09:19:03 +10:00
simplify.rs Use Itertools::all_equal_value() where applicable 2025-09-05 18:43:43 +00:00
simplify_branches.rs Fix binding mode problems 2025-02-22 00:13:19 +00:00
simplify_comparison_integral.rs mir: Add a new method to statement 2025-06-29 20:13:36 +08:00
single_use_consts.rs Inline and replace Statement::replace_nop. 2025-02-18 13:43:43 +11:00
sroa.rs Re-block SRoA on SIMD types 2025-07-29 20:41:34 -07:00
ssa.rs Introduce PlaceContext::may_observe_address. 2025-09-07 13:51:53 +00:00
strip_debuginfo.rs Disable non-required MIR opts with optimize(none) 2025-01-23 17:40:41 +00:00
unreachable_enum_branching.rs Move MirPatch from rustc_middle to rustc_mir_transform. 2025-02-14 16:15:57 +11:00
unreachable_prop.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
validate.rs remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00