[PATCH] Atomics: emit cmpxchg instructions with weaker failure-order

Tim Northover t.p.northover at gmail.com
Wed Mar 12 06:17:36 PDT 2014


Hi all,

Now that the LLVM IR supports specifying a failure memory ordering on cmpxchg, Clang should start emitting them. With this patch I decided to go straight for the "N x M" possible outputs because __c11_atomic_compare_exchange is used by libc++, so just handling the constant case would exclude a lot of users from the potential benefits.

Does it look OK?

Cheers.

Tim.

http://llvm-reviews.chandlerc.com/D3053

Files:
  lib/CodeGen/CGAtomic.cpp
  test/CodeGen/atomic-ops.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3053.1.patch
Type: text/x-patch
Size: 13967 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140312/2c115b81/attachment.bin>


More information about the cfe-commits mailing list