rust/compiler/rustc_codegen_ssa/src/traits
Matthias Krüger ad2d91ce11
Rollup merge of #141507 - RalfJung:atomic-intrinsics, r=bjorn3
atomic_load intrinsic: use const generic parameter for ordering

We have a gazillion intrinsics for the atomics because we encode the ordering into the intrinsic name rather than making it a parameter. This is particularly bad for those operations that take two orderings. Let's fix that!

This PR only converts `load`, to see if there's any feedback that would fundamentally change the strategy we pursue for the const generic intrinsics.

The first two commits are preparation and could be a separate PR if you prefer.

`@BoxyUwU` -- I hope this is a use of const generics that is unlikely to explode? All we need is a const generic of enum type. We could funnel it through an integer if we had to but an enum is obviously nicer...

`@bjorn3` it seems like the cranelift backend entirely ignores the ordering?
2025-05-30 07:01:30 +02:00
..
abi.rs Remove an unused lifetime param 2025-02-24 15:11:29 +00:00
asm.rs Pass &mut self to codegen_global_asm 2025-04-14 09:38:04 +00:00
backend.rs Move supports_parallel from CodegenBackend to ExtraBackendMethods 2025-05-28 20:55:00 +00:00
builder.rs Rollup merge of #141507 - RalfJung:atomic-intrinsics, r=bjorn3 2025-05-30 07:01:30 +02:00
consts.rs Rollup merge of #137549 - oli-obk:llvm-ffi, r=davidtwco 2025-03-07 19:15:34 +01:00
coverageinfo.rs Remove BackendTypes constraint from traits that don't need it. 2024-09-17 10:24:43 +10:00
debuginfo.rs Use ExistentialTraitRef throughout codegen 2025-01-30 15:34:00 +00:00
declare.rs Make predefine methods take &mut self 2025-05-28 20:55:00 +00:00
intrinsic.rs Remove usage of FnAbi in codegen_intrinsic_call 2025-05-26 10:13:03 +00:00
misc.rs The personality function is a Function, not a Value 2025-05-28 20:55:00 +00:00
mod.rs Reduce amount of types that need to be PartialEq 2025-05-28 20:55:00 +00:00
statics.rs Remove methods from StaticCodegenMethods that are not called in cg_ssa itself 2025-05-28 20:55:00 +00:00
type_.rs Remove unused arg_memory_ty method 2025-05-28 20:55:00 +00:00
write.rs Mark all optimize methods and the codegen method as safe 2025-05-28 20:55:00 +00:00