summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-06-13 19:43:04 +0000
committerTim Northover <tnorthover@apple.com>2014-06-13 19:43:04 +0000
commit9478a68558c7ecd79d8017645537c69bb90d76f9 (patch)
tree528a2f605fa840830665ad6b07b49d192ab3a292 /lib/CodeGen/CGExprAgg.cpp
parent43ada3da13132d6a056ff5304ec5bccda92bc6a5 (diff)
downloadclang-9478a68558c7ecd79d8017645537c69bb90d76f9.tar.gz
clang-9478a68558c7ecd79d8017645537c69bb90d76f9.tar.bz2
clang-9478a68558c7ecd79d8017645537c69bb90d76f9.tar.xz
Atomics: emit "cmpxchg weak" where possible
Most builtins date from before the "cmpxchg weak" was a gleam in the C++ committee's eye, so fortunately not much needs to change. But a few of them *do* acknowledge that failure is possible. For these, we'll emit the usual cartesian product of cmpxchg operations if we can't statically determine weakness. CodeGen can sort it out later if the function gets inlined. The only other non-trivial aspect of this is (I think) that we emit the scalar expression for "IsWeak" once, at the beginning, and propagate its value through the successive blocks. There's not much in it, but it's slightly more consistent with the existing handling of FailureOrder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210932 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
0 files changed, 0 insertions, 0 deletions