From patchwork Tue Nov 15 03:35:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongyu Wang X-Patchwork-Id: 20167 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2499640wru; Mon, 14 Nov 2022 19:36:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf63gOzY4f7ZAScbunLa+ZkgnMULOmw3zVmO9PYUZfCHudUJVbD/I+4NfflYklv5zpRIVuO6 X-Received: by 2002:a50:8acc:0:b0:461:c563:defa with SMTP id k12-20020a508acc000000b00461c563defamr13164853edk.72.1668483413444; Mon, 14 Nov 2022 19:36:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668483413; cv=none; d=google.com; s=arc-20160816; b=iUz6oS/tWQKj8b/LMcOfOGmX8WOurmPQ0UGgxWbB/E/eNchrEzQdVu5kE1jY73Au3T +s+1n4IiinsVDXiXwcWKKThNGWBc0aR+1zTV8EvcWELcowhN87iDXZRzIXmWiq2n/phV j/D8MBjHhCJfkfkibHTn6Sz6MECiu6E2DPxs0UjCCBPiOtoTpsjuZiMizhS/NjAvCItI hWEWiuIHgTLg4oZg4/slRRGwOxqxBktx6fqmaqg6OB5obGUJfRX3cI4/3hD2X8S26RCA StwefRVWvrBkhustjOA3Ag4Bmyl8IIkNmaPbB/ZePel6UN4QL2GKaUCBmfQtaiZIz67g P2VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:message-id:date :subject:cc:to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=T05Xuwt232FoQ6i+rOWO5TNHBCHi0Rjh2KhTIUqBpso=; b=fbEGaLGw69U8xdIkbEpxBKDarXaBIgu+VWJ66DDesYjHvoweBOiuRWd3luYMnGTGHF GcIBOYvlM01aKk6geAvf542lqaxNuZyRG5Q0NomMsdROz8rkYuE2o6Kn79yxR6jUe3Cd 60Kr4za7XtN0wMyNhEpd76riFGXyCWZDx6CavcFI5tr87Y9JHGe0kHwXFyO+uwNdQplg DrKsNm54b+R9JwJucafD4YhFb8kmkI89VLXR5kdT5oU6EFk7DIAWzFkI96Hn2Shzadkh L9zXClUvxCi7TikxF190sYuxlnzmcGTcD743K3Rgt/qRHi/RS/y7fSDu0NEIqCj9MeRG diqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=hfdlPWVf; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id e12-20020a1709062c0c00b007ae09db5f4esi7998996ejh.657.2022.11.14.19.36.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 19:36:53 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=hfdlPWVf; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5F0193851888 for ; Tue, 15 Nov 2022 03:36:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F0193851888 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668483407; bh=T05Xuwt232FoQ6i+rOWO5TNHBCHi0Rjh2KhTIUqBpso=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=hfdlPWVf6wHb3qpkPsrf0A7lMqXmd0OPhUQ+MuKNbnFKwwuIb57o/7y1wTTZvjnhQ UZ6u1GEwg9/GrJZ1YqaEU0+SC295xlkmFLIsOHNWN7HkCUinI/kW6PjWFUkpY5mAWl wnLSS5dJI6h1KUBCO1JMKGscRNf43y6LvGQdAlIU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by sourceware.org (Postfix) with ESMTPS id BA9BD38582A1 for ; Tue, 15 Nov 2022 03:36:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BA9BD38582A1 X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="292545519" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="292545519" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2022 19:36:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="781183963" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="781183963" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by fmsmga001.fm.intel.com with ESMTP; 14 Nov 2022 19:36:00 -0800 Received: from shliclel320.sh.intel.com (shliclel320.sh.intel.com [10.239.240.127]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 9EDF410056B2; Tue, 15 Nov 2022 11:35:59 +0800 (CST) To: gcc-patches@gcc.gnu.org Cc: hongtao.liu@intel.com, ubizjak@gmail.com Subject: [PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676] Date: Tue, 15 Nov 2022 11:35:59 +0800 Message-Id: <20221115033559.66827-1-hongyu.wang@intel.com> X-Mailer: git-send-email 2.18.1 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE, SPF_SOFTFAIL, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Hongyu Wang via Gcc-patches From: Hongyu Wang Reply-To: Hongyu Wang Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749531663714467264?= X-GMAIL-MSGID: =?utf-8?q?1749531663714467264?= 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 +(e.g. __atomic_fetch_(or|and|xor|nand) and their __atomic_*_fetch +counterparts), emit an atomic load before cmpxchg instruction. If the +loaded value is not equal to expected, execute a pause instead of +directly run the cmpxchg instruction. This might reduce excessive +cacheline bouncing. @item -mindirect-branch=@var{choice} @opindex mindirect-branch