rust/compiler/rustc_codegen_cranelift/src
bors 75963ce795 Auto merge of #151065 - nagisa:add-preserve-none-abi, r=petrochenkov
abi: add a rust-preserve-none calling convention

This is the conceptual opposite of the rust-cold calling convention and is particularly useful in combination with the new `explicit_tail_calls` feature.

For relatively tight loops implemented with tail calling (`become`) each of the function with the regular calling convention is still responsible for restoring the initial value of the preserved registers. So it is not unusual to end up with a situation where each step in the tail call loop is spilling and reloading registers, along the lines of:

    foo:
        push r12
        ; do things
        pop r12
        jmp next_step

This adds up quickly, especially when most of the clobberable registers are already used to pass arguments or other uses.

I was thinking of making the name of this ABI a little less LLVM-derived and more like a conceptual inverse of `rust-cold`, but could not come with a great name (`rust-cold` is itself not a great name: cold in what context? from which perspective? is it supposed to mean that the function is rarely called?)
2026-01-25 02:49:32 +00:00
..
abi abi: add a rust-preserve-none calling convention 2026-01-24 19:23:17 +02:00
debuginfo Support debuginfo for assoc const bindings 2026-01-21 18:52:08 +01:00
driver Merge commit '8de4afd39b' into sync_cg_clif-2025-12-18 2025-12-18 11:50:08 +00:00
intrinsics Rollup merge of #151346 - folkertdev:simd-splat, r=workingjubilee 2026-01-24 21:04:15 +01:00
optimize Use let...else instead of match foo { ... _ => return }; and if let ... else return 2025-12-12 17:52:39 +00:00
allocator.rs Remove -Zoom=panic 2025-11-28 19:30:39 +00:00
analyze.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
base.rs Use ScalarInt from bool. 2025-12-14 17:29:59 +00:00
cast.rs Merge commit '979dcf8e2f' into sync_cg_clif-2025-05-25 2025-05-25 18:51:16 +00:00
codegen_f16_f128.rs rustc_target: hide TargetOptions::vendor 2025-11-09 17:43:36 -05:00
codegen_i128.rs Windows x86: Change i128 to return via the vector ABI 2025-01-27 12:12:59 +00:00
common.rs Merge commit 'e24f0fa3c5' into sync_cg_clif-2025-12-08 2025-12-08 16:20:48 +00:00
compiler_builtins.rs Merge commit 'a0b865dc87' into sync_cg_clif-2025-11-08 2025-11-08 14:18:53 +00:00
concurrency_limiter.rs Remove jobserver from Session 2024-12-13 10:21:22 +00:00
config.rs Merge commit 'a0b865dc87' into sync_cg_clif-2025-11-08 2025-11-08 14:18:53 +00:00
constant.rs Use ScalarInt from bool. 2025-12-14 17:29:59 +00:00
discriminant.rs Change tag_field to FieldIdx in Variants::Multiple 2025-06-03 23:42:21 -07:00
global_asm.rs Finish transition from semitransparent to semiopaque for rustc_macro_transparency 2026-01-08 19:14:45 +01:00
inline_asm.rs simplify how inline asm handles MaybeUninit 2025-12-13 15:50:02 +01:00
lib.rs Remove all allows for diagnostic_outside_of_impl and untranslatable_diagnostic throughout the codebase 2026-01-19 17:39:49 +01:00
linkage.rs Port the #[linkage] attribute to the new attribute system 2025-08-13 21:01:37 +02:00
main_shim.rs Merge commit 'a0b865dc87' into sync_cg_clif-2025-11-08 2025-11-08 14:18:53 +00:00
num.rs Replace some Option<Span> with Span and use DUMMY_SP instead of None 2025-06-05 14:14:59 +00:00
pointer.rs Merge commit '1fa693ca44' into sync_cg_clif-2024-11-09 2024-11-09 13:48:06 +00:00
pretty_clif.rs layout: Store inverse memory index in FieldsShape::Arbitrary 2025-12-18 22:25:34 +01:00
toolchain.rs Merge commit 'e9d1a0a7b0' into sync_cg_clif-2022-08-24 2022-08-24 18:40:58 +02:00
unsize.rs Merge commit 'a0b865dc87' into sync_cg_clif-2025-11-08 2025-11-08 14:18:53 +00:00
unwind_module.rs Merge commit '979dcf8e2f' into sync_cg_clif-2025-05-25 2025-05-25 18:51:16 +00:00
value_and_place.rs Merge commit 'a0b865dc87' into sync_cg_clif-2025-11-08 2025-11-08 14:18:53 +00:00
vtable.rs Merge commit 'a0b865dc87' into sync_cg_clif-2025-11-08 2025-11-08 14:18:53 +00:00