Re: [PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676]

2022-11-16 Thread Jonathan Wakely via Gcc-patches
On Wed, 16 Nov 2022 at 07:51, Alexander Monakov wrote: > > > On Wed, 16 Nov 2022, Hongyu Wang wrote: > > > > 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 at

Re: [PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676]

2022-11-16 Thread Hongyu Wang via Gcc-patches
> Please use 'git commit --author' to indicate authorship of the patch > (or simply let me push it once approved). Yes, just change the author and push it. Thanks for your help!

Re: [PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676]

2022-11-15 Thread Alexander Monakov via Gcc-patches
On Wed, 16 Nov 2022, Hongyu Wang wrote: > > 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

Re: [PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676]

2022-11-15 Thread Hongyu Wang via Gcc-patches
issuing an atomic load before the > @code{CMPXCHG} instruction, and using the @code{PAUSE} instruction > to save CPU power when restarting the loop. > > Alexander From e82f3e03115480ac3d055819658a107249932c65 Mon Sep 17 00:00:00 2001 From: Hongyu Wang Date: Tue, 15 Nov 2022 11:16:17 +0800 Subje

Re: [PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676]

2022-11-15 Thread Alexander Monakov via Gcc-patches
On Tue, 15 Nov 2022, Jonathan Wakely wrote: > > How about the following: > > > > 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

Re: [PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676]

2022-11-15 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Nov 2022 at 13:34, Alexander Monakov wrote: > > On Tue, 15 Nov 2022, Jonathan Wakely via Gcc-patches wrote: > > > > @item -mrelax-cmpxchg-loop > > > @opindex mrelax-cmpxchg-loop > > >-Relax cmpxchg loop by emitting an early load and compare before cmpxchg, > > >-execute pause if load va

Re: [PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676]

2022-11-15 Thread Alexander Monakov via Gcc-patches
On Tue, 15 Nov 2022, Jonathan Wakely via Gcc-patches wrote: > > @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 whe

Re: [PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676]

2022-11-15 Thread Jonathan Wakely via Gcc-patches
On 15/11/22 11:35 +0800, Hongyu Wang wrote: Hi, According to PR 107676, the document of -mrelax-cmpxchg-loop is nonsensical. Adjust the wording according to the comments. Bootstrapped on x86_64-pc-linux-gnu, ok for trunk? gcc/ChangeLog: PR target/107676 * doc/invoke.texi: Rewo

[PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676]

2022-11-14 Thread Hongyu Wang via Gcc-patches
Hi, According to PR 107676, the document of -mrelax-cmpxchg-loop is nonsensical. Adjust the wording according to the comments. Bootstrapped on x86_64-pc-linux-gnu, ok for trunk? gcc/ChangeLog: PR target/107676 * doc/invoke.texi: Reword the description of -mrelax-cmpxchg-