atomic RMW intrinsics: avoid unnecessary ptr/int conversions #134617
Labels
A-atomic
Area: Atomics, barriers, and sync primitives
A-codegen
Area: Code generation
A-intrinsics
Area: Intrinsics
A-strict-provenance
Area: Strict provenance for raw pointers
Currently, the type of out atomic RMW intrinsics looks like
However, this is not quite what we want: for atomic operations on a pointer, we want
dst
to be something like*mut *mut T
, butsrc
should beusize
. The return type should be*mut T
.This would let us avoid some unnecessary casts in
AtomicPtr
, and shift the burden of mapping this operation to something LLVM supports into the backend. It also makes the semantics of these operations more clear: only the provenance of the in-memory data matters;src
carries no provenance.The text was updated successfully, but these errors were encountered: