X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FAtomics.html;h=2358f4d2ef2268ccfa1ffb456d7b6be699c68cdf;hb=3429c7571e87ca6070ceb1b44b1f367ce23c99f9;hp=357f43167bf6aefc1c8233152f16bfb35ed214a2;hpb=91a44dd9ccd8ec3a10fa35315c381cffade91d5b;p=oota-llvm.git diff --git a/docs/Atomics.html b/docs/Atomics.html index 357f43167bf..2358f4d2ef2 100644 --- a/docs/Atomics.html +++ b/docs/Atomics.html @@ -4,7 +4,7 @@
However, LLVM is not allowed to transform the former to the latter: it could - introduce undefined behavior if another thread can access x at the same time. - (This example is particularly of interest because before the concurrency model - was implemented, LLVM would perform this transformation.)
+ indirectly introduce undefined behavior if another thread can access x at + the same time. (This example is particularly of interest because before the + concurrency model was implemented, LLVM would perform this + transformation.)Note that speculative loads are allowed; a load which
is part of a race returns undef
, but does not have undefined
@@ -177,7 +178,7 @@ void f(int* a) {
In order to achieve a balance between performance and necessary guarantees, there are six levels of atomicity. They are listed in order of strength; each level includes all the guarantees of the previous level except for - Acquire/Release.
+ Acquire/Release. (See also LangRef.)NotAtomic is the obvious, a load or store which is not atomic. (This isn't really a level of atomicity, but is listed here for comparison.) This is - essentially a regular load or store. If code accesses a memory location - from multiple threads at the same time, the resulting loads return - 'undef'.
+ essentially a regular load or store. If there is a race on a given memory + location, loads from that location return undef.cmpxchg
and
+ and stores. No fences are required. cmpxchg
and
atomicrmw
are required to appear as a single operation.