Polish atomic pointers
authorJF Bastien <jfb@google.com>
Thu, 17 Dec 2015 22:09:19 +0000 (22:09 +0000)
committerJF Bastien <jfb@google.com>
Thu, 17 Dec 2015 22:09:19 +0000 (22:09 +0000)
commit7e54c38de03268a98f329069556b7bcf166c8f05
tree4a704d99d74a7935c11d94cd6d88f68e0c3fb99f
parent5d2e46b5faeca80ca5999b08a07a9b749f80f9fd
Polish atomic pointers

Summary:
I didn't realize that we already allowed atomic load/store of pointers,
it was added in 2012 by r162146. This patch updates the documentation
and tightens the verifier by using DataLayout to make sure that the
stored size is byte-sized and power-of-two. DataLayout is also used for
integers, and while I'm here I updated the corresponding code for
cmpxchg and rmw.

See the following discussion for context and upcoming changes to
add floating-point and vector atomics:
  https://groups.google.com/forum/#!topic/llvm-dev/Nh0P_E3CRoo/discussion

Reviewers: reames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15512

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255931 91177308-0d34-0410-b5e6-96231b3b80d8
docs/LangRef.rst
lib/IR/Verifier.cpp
test/Verifier/atomics.ll