[libcxx-commits] [libcxx] [libc++] Increase `atomic_ref`'s required alignment for small types (PR #99654)

James Y Knight via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 24 14:44:20 PDT 2024


jyknight wrote:

Ugh...actually...lemme take that back -- we aren't using that alignment info, currently. So I am wrong about the current behavior, and you are right.

What I said is what we should _want_ to be the case, but it's not now.

This PR is still an improvement, and makes the ABI change that's required. But the purpose of requiring alignment is to generate efficient accesses, and this doesn't actually get there, yet. We instead generate a libcall (which, if the object is in fact aligned to required_alignment, will be lock-free), but it's still overhead of a should-be unnecessary libcall.



https://github.com/llvm/llvm-project/pull/99654


More information about the libcxx-commits mailing list