[llvm] [RFC][BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

Andrii Nakryiko via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 12:28:41 PDT 2024


anakryiko wrote:

Not all orderings are meaningful on all architectures, but compilers don't error out on that, no? Think about writers of some common helpers dealing with atomic primitives. Why should they worry about which specific mode is supported (especially that that might change over time depending on *kernel version*)? They request the *minimum* level of ordering, but they would equally well work with more strict ordering, if the underlying architecture (verifier/JIT in this case) doesn't support some of them on some older versions.

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


More information about the llvm-commits mailing list