[PATCH] D129802: [DRAFT] Implementing new atomic orderings in LLVM and generate barriers for legacy __sync builtins. Support corresponding memory model in outline atomics as well.

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 15:20:08 PDT 2022


jyknight added a comment.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697 is the relevant discussion thread that added these to GCC. I personally never found it very convincing, even back in 2015 when they first made the change.

And, now, 7 years later, I'd be even more reluctant to add this to LLVM's core atomic memory model. By now, the `__sync_*` routines have been obsolete for over a decade. And they never really had a proper memory model description in the first place -- I don't see how they even make sense to use //at all// on a non-TSO (which is to say: non-X86) memory architecture, since they don't include proper atomic load/store operations.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129802/new/

https://reviews.llvm.org/D129802



More information about the llvm-commits mailing list