ARM: use LLVM's atomicrmw instructions when ldrex/strex are available.
authorTim Northover <tnorthover@apple.com>
Wed, 9 Jul 2014 09:24:43 +0000 (09:24 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 9 Jul 2014 09:24:43 +0000 (09:24 +0000)
commite8c3721165ddedaf3c96ea036bc9728948558a1d
treea6f3b2add92caf939fb30337a8ce1ee72fe4cbc3
parentc75e1effed73e1a3f7e9b509634648d71c1dddcf
ARM: use LLVM's atomicrmw instructions when ldrex/strex are available.

Having some kind of weird kernel-assisted ABI for these when the
native instructions are available appears to be (and should be) the
exception; OSs have been gradually opting in for years and the code
was getting silly.

So let LLVM decide whether it's possible/profitable to inline them by
default.

Patch by Phoebe Buckheister.

llvm-svn: 212598
clang/lib/Basic/Targets.cpp
clang/test/CodeGen/arm-atomics-m.c [new file with mode: 0644]
clang/test/CodeGen/arm-atomics-m0.c [new file with mode: 0644]
clang/test/CodeGen/arm-atomics.c [new file with mode: 0644]