From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from server.nextmovesoftware.com (server.nextmovesoftware.com [162.254.253.69]) by sourceware.org (Postfix) with ESMTPS id 7A7803858C50 for ; Sat, 23 Jul 2022 09:26:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A7803858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nextmovesoftware.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nextmovesoftware.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nextmovesoftware.com; s=default; h=Content-Type:MIME-Version:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=i9/BX/UZ78CrjuqKB3H+lLxytmCxLdlU4G2tLDi9JxQ=; b=GcOQWqQVTy0hJ+JeoXVm4Ev0dI 7LpCZa1hfzOnhyd/P+9Fw/DxC7jhu3Ox71wI7TYfnV/47ELwPTb9s9zcNwbsx+RMKbfbHjB88MzVn OQF5qXBUI7v68LoBofpXZVIvEMRSUWjswaA8UYers4qb4lm1vZb1F82hjZVs3+j6TZXUZYVHyMsmq DpmnTP0GUb1bDE62Gjn8ZcphwkqSa5TZz4BSRu4iZVyTx6DNk0PPITSh/SrCSRPdxdFr+V1UxG/lY 8YlTcm4QjJ2381ZSPlyy8l0XYZ+IqgMqaTJmFt0QdnDItfIb3Q671rqRhP3YlLqFgiI7ACnWZieu0 uSSdTVfw==; Received: from host109-154-33-170.range109-154.btcentralplus.com ([109.154.33.170]:55476 helo=Dell) by server.nextmovesoftware.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oFBPA-0002eq-QV for gcc-patches@gcc.gnu.org; Sat, 23 Jul 2022 05:26:37 -0400 From: "Roger Sayle" To: "'GCC Patches'" Subject: [Documentation] Correct RTL documentation: (use (mem ...)) is allowed. Date: Sat, 23 Jul 2022 10:26:34 +0100 Message-ID: <06f201d89e76$4ddb3210$e9919630$@nextmovesoftware.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_06F3_01D89E7E.AFA20B10" X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdiedaHS00uNQURJRnGXcZAXkmSqzg== Content-Language: en-gb X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.nextmovesoftware.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nextmovesoftware.com X-Get-Message-Sender-Via: server.nextmovesoftware.com: authenticated_id: roger@nextmovesoftware.com X-Authenticated-Sender: server.nextmovesoftware.com: roger@nextmovesoftware.com X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_NONE, SPF_PASS, 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-List-Received-Date: Sat, 23 Jul 2022 09:26:38 -0000 This is a multipart message in MIME format. ------=_NextPart_000_06F3_01D89E7E.AFA20B10 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This patch is a one line correction/clarification to GCC's current RTL documentation that explains a USE of a MEM is permissible. PR rtl-optimization/99930 is an interesting example on x86_64 where the backend generates better code when a USE is a (const) MEM than when it is a REG. In fact the backend relies on CSE to propagate the MEM (a constant pool reference) into the USE, to enable combine to merge/simplify instructions. This change has been tested with a make bootstrap, but as it might provoke a discussion, I've decided to not consider it "obvious". Ok for mainline (to document the actual current behavior)? 2022-07-23 Roger Sayle gcc/ChangeLog * doc/rtl.texi (use): Document that the operand may be a MEM. Roger -- ------=_NextPart_000_06F3_01D89E7E.AFA20B10 Content-Type: text/plain; name="patchdo.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="patchdo.txt" diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi=0A= index 43c9ee8..995c8be 100644=0A= --- a/gcc/doc/rtl.texi=0A= +++ b/gcc/doc/rtl.texi=0A= @@ -3283,7 +3283,8 @@ Represents the use of the value of @var{x}. It = indicates that the=0A= value in @var{x} at this point in the program is needed, even though=0A= it may not be apparent why this is so. Therefore, the compiler will=0A= not attempt to delete previous instructions whose only effect is to=0A= -store a value in @var{x}. @var{x} must be a @code{reg} expression.=0A= +store a value in @var{x}. @var{x} must be a @code{reg} or a @code{mem}=0A= +expression.=0A= =0A= In some situations, it may be tempting to add a @code{use} of a=0A= register in a @code{parallel} to describe a situation where the value=0A= ------=_NextPart_000_06F3_01D89E7E.AFA20B10--