public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4094] doc: fix description of -mrelax-cmpxchg-loop [PR 107676]
@ 2022-11-16 13:42 Alexander Monakov
  0 siblings, 0 replies; only message in thread
From: Alexander Monakov @ 2022-11-16 13:42 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:85966f0d20baf50a767ac1110f537395441604a9

commit r13-4094-g85966f0d20baf50a767ac1110f537395441604a9
Author: Alexander Monakov <amonakov@ispras.ru>
Date:   Wed Nov 16 16:33:11 2022 +0300

    doc: fix description of -mrelax-cmpxchg-loop [PR 107676]
    
    gcc/ChangeLog:
    
            PR target/107676
            * doc/invoke.texi (-mrelax-cmpxchg-loop): Reword description.

Diff:
---
 gcc/doc/invoke.texi | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index cbfe1102bd2..96f0b6d08bd 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-16 13:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-16 13:42 [gcc r13-4094] doc: fix description of -mrelax-cmpxchg-loop [PR 107676] Alexander Monakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).