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)
commitd1fb58538ff3e9fd1a89dc4a840a48c337414027
tree4042008c68475f23fd077fa822b08e27468f6cbc
parent762a6ac0b5c7565e08b78f3bd6fef7c5c9b49d5d
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

llvm-svn: 255931
llvm/docs/LangRef.rst
llvm/lib/IR/Verifier.cpp
llvm/test/Verifier/atomics.ll