]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
doc: fix description of -mrelax-cmpxchg-loop [PR 107676]
authorAlexander Monakov <amonakov@ispras.ru>
Wed, 16 Nov 2022 13:33:11 +0000 (16:33 +0300)
committerAlexander Monakov <amonakov@ispras.ru>
Wed, 16 Nov 2022 13:41:39 +0000 (16:41 +0300)
gcc/ChangeLog:

PR target/107676
* doc/invoke.texi (-mrelax-cmpxchg-loop): Reword description.

gcc/doc/invoke.texi

index cbfe1102bd208ec6a7c580770800c051aea1c026..96f0b6d08bdf3026d2f5b536c2d79beaf26833cd 100644 (file)
@@ -33561,10 +33561,11 @@ registers.
 
 @item -mrelax-cmpxchg-loop
 @opindex mrelax-cmpxchg-loop
-Relax cmpxchg loop by emitting an early load and compare before cmpxchg,
-execute pause if load value is not expected. This reduces excessive
-cachline bouncing when and works for all atomic logic fetch builtins
-that generates compare and swap loop.
+When emitting a compare-and-swap loop for @ref{__sync Builtins}
+and @ref{__atomic Builtins} lacking a native instruction, optimize
+for the highly contended case by issuing an atomic load before the
+@code{CMPXCHG} instruction, and using the @code{PAUSE} instruction
+to save CPU power when restarting the loop.
 
 @item -mindirect-branch=@var{choice}
 @opindex mindirect-branch