[llvm] [AArch64] Set MaxAtomicSizeInBitsSupported. (PR #74385)
James Y Knight via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 5 05:27:33 PST 2023
jyknight wrote:
Yes, that's what we already do today (and this PR doesn't change it), but that is:
- Invalid, because load doesn't work on read-only memory (it's not particularly useful to do an atomic-load on read-only-memory, but is permitted at the C/C++ level, and can arise in generic usages -- we miscompile this code today)
- Unexpectedly-poorly-performing, because loads cause contention with each-other. (This upsets users who quite reasonably believe that lock-free atomics should not contend on loads)
It's unfortunate that we've been emitting it so far, and on both X86 and AArch64 I think we should be falling back to libatomic unless load is available natively. (But, again: future work, not this PR.)
https://github.com/llvm/llvm-project/pull/74385
More information about the llvm-commits
mailing list