From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 9B9D6388B6B3 for ; Tue, 15 Nov 2022 10:53:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9B9D6388B6B3 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668509616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+2o8xHT/xxN9PIY/cj7Byo0ZaHUbttANQ7g6m9lwVfI=; b=Z4UTFNpbIxSbLcYf1UO7sTaekCPsKJD1w/21vZt0sKBWwmUmdy2YsBmSMNyEUHiOuSjDyx QdI1NuG3U7SeEQ6P0Xac8HnngcrtnT5CfwXwrIlYgHB16XtzCh3QWIQqCL4+ja4eBXSj5H Mski4IyUeTYsDgfRzOrXT/6OfdC+xzE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-218-gA35Q5HPMP2eoaJWOI9L-w-1; Tue, 15 Nov 2022 05:53:35 -0500 X-MC-Unique: gA35Q5HPMP2eoaJWOI9L-w-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A8D751C075AB; Tue, 15 Nov 2022 10:53:34 +0000 (UTC) Received: from localhost (unknown [10.33.36.199]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7146449BB60; Tue, 15 Nov 2022 10:53:34 +0000 (UTC) Date: Tue, 15 Nov 2022 10:53:31 +0000 From: Jonathan Wakely To: Hongyu Wang Cc: gcc-patches@gcc.gnu.org, hongtao.liu@intel.com, ubizjak@gmail.com Subject: Re: [PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676] Message-ID: References: <20221115033559.66827-1-hongyu.wang@intel.com> MIME-Version: 1.0 In-Reply-To: <20221115033559.66827-1-hongyu.wang@intel.com> X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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: Reword the description of > -mrelax-cmpxchg-loop. >--- > gcc/doc/invoke.texi | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi >index 40f667a630a..bdd7c319aef 100644 >--- a/gcc/doc/invoke.texi >+++ b/gcc/doc/invoke.texi >@@ -33805,10 +33805,12 @@ 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. >+For compare and swap loops that emitted by some __atomic_* builtins s/that emitted/that are emitted/ >+(e.g. __atomic_fetch_(or|and|xor|nand) and their __atomic_*_fetch >+counterparts), emit an atomic load before cmpxchg instruction. If the s/before cmpxchg/before the cmpxchg/ >+loaded value is not equal to expected, execute a pause instead of s/not equal to expected/not equal to the expected/ >+directly run the cmpxchg instruction. This might reduce excessive s/directly run/directly running/ >+cacheline bouncing. > > @item -mindirect-branch=@var{choice} > @opindex mindirect-branch