diff options
author | Andrew Trick <atrick@apple.com> | 2011-08-12 00:36:38 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2011-08-12 00:36:38 +0000 |
commit | a1b953b61a7855ada37a8f3e148bb116348ef21b (patch) | |
tree | b8db24d2927c2a1e12559a71c1a547a2c5be19a0 /docs/Atomics.html | |
parent | 126a54f1fa233d9da377a3e9f2ae85ff5fe34d9f (diff) | |
download | external_llvm-a1b953b61a7855ada37a8f3e148bb116348ef21b.zip external_llvm-a1b953b61a7855ada37a8f3e148bb116348ef21b.tar.gz external_llvm-a1b953b61a7855ada37a8f3e148bb116348ef21b.tar.bz2 |
Clarify the definition of SequentiallyConsistent operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137403 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/Atomics.html')
-rw-r--r-- | docs/Atomics.html | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/docs/Atomics.html b/docs/Atomics.html index 2b097b3..d5bf9fa 100644 --- a/docs/Atomics.html +++ b/docs/Atomics.html @@ -330,9 +330,10 @@ instructions has been clarified in the IR.</p> <div> -<p>SequentiallyConsistent (<code>seq_cst</code> in IR) provides Acquire and/or - Release semantics, and in addition guarantees a total ordering exists with - all other SequentiallyConsistent operations. +<p>SequentiallyConsistent (<code>seq_cst</code> in IR) provides + Acquire semantics for loads and Release semantics for + stores. Additionally, it guarantees that a total ordering exists + between all SequentiallyConsistent operations. <dl> <dt>Relevant standard</dt> @@ -344,11 +345,17 @@ instructions has been clarified in the IR.</p> reason about for the programmer than other kinds of operations, and using them is generally a practical performance tradeoff.</dd> <dt>Notes for optimizers</dt> - <dd>In general, optimizers should treat this like a nothrow call; the - the possible optimizations are usually not interesting.</dd> + <dd>In general, optimizers should treat this like a nothrow call. + However, optimizers may improve performance by reordering a + store followed by a load unless both operations are sequentially + consistent.</dd> <dt>Notes for code generation</dt> - <dd>SequentiallyConsistent operations generally require the strongest - barriers supported by the architecture.</dd> + <dd>SequentiallyConsistent loads minimally require the same barriers + as Acquire operations and SequeuentiallyConsistent stores require + Release barriers. Additionally, the code generator must enforce + ordering between SequeuentiallyConsistent stores followed by + SequeuentiallyConsistent loads. On common architectures, this + requires emitting a full fence after SequeuentiallyConsistent stores.</dd> </dl> </div> |