Clarify the definition of SequentiallyConsistent operations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137403 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick 2011-08-12 00:36:38 +00:00
parent 126a54f1fa
commit a1b953b61a

View File

@ -330,9 +330,10 @@ instructions has been clarified in the IR.</p>
<div> <div>
<p>SequentiallyConsistent (<code>seq_cst</code> in IR) provides Acquire and/or <p>SequentiallyConsistent (<code>seq_cst</code> in IR) provides
Release semantics, and in addition guarantees a total ordering exists with Acquire semantics for loads and Release semantics for
all other SequentiallyConsistent operations. stores. Additionally, it guarantees that a total ordering exists
between all SequentiallyConsistent operations.
<dl> <dl>
<dt>Relevant standard</dt> <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 reason about for the programmer than other kinds of operations, and using
them is generally a practical performance tradeoff.</dd> them is generally a practical performance tradeoff.</dd>
<dt>Notes for optimizers</dt> <dt>Notes for optimizers</dt>
<dd>In general, optimizers should treat this like a nothrow call; the <dd>In general, optimizers should treat this like a nothrow call.
the possible optimizations are usually not interesting.</dd> 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> <dt>Notes for code generation</dt>
<dd>SequentiallyConsistent operations generally require the strongest <dd>SequentiallyConsistent loads minimally require the same barriers
barriers supported by the architecture.</dd> 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> </dl>
</div> </div>