Message ID | ZNPXsZL3/mmxuDT5@tucnak |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2987869vqr; Wed, 9 Aug 2023 11:16:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG2+u5IJ8/yYfUE7BA4X5Qhiw2cQJK9jylmR1M3mtyakanWAE145fqbfbpbjnaEwenHA3Md X-Received: by 2002:a17:906:1092:b0:98d:76f8:217b with SMTP id u18-20020a170906109200b0098d76f8217bmr2731004eju.73.1691604960940; Wed, 09 Aug 2023 11:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691604960; cv=none; d=google.com; s=arc-20160816; b=md0K6ugVHSgGTUKCf6p1cqjReL/eQlknAUMsvWeACxXQtdBkcwpHIZ6/5mhdfaunjC Qv7Eo9N7q2OWcBKAWXi56ObF0WNESlFwsEPTjutIlHRD7DO9GcE/V3H8BMMuJsxH63Vl LYkVzjkXrf7bIFlcmN7KtWhLI1EnU58F4Ljvk7G/xLA6rOVQEGuYpJOkmBkKmVF8+/gQ OMxVIpQ/BIoT5OzrPcpPvXUZuXPX9NwpHZwZp9dDhHweSI8t+xw1e4Bv38y307XO3cGs m++ic/02VOWtcmEtO9VTEtGuhvebWW2x3N5xx9eEWEpOyhEmipyS/XgFAN/nXKCLNDbV 4Mqw== 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 :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=wGW4ezNfcz3uNwnodbLJz1LBzJUIxSvGF/gVuLXEK/Y=; fh=fteJLpb59VrvFh/kM75rW7nRpNe+RexDgs4c2irEcIM=; b=D05d+roA1wR1mDrpjA/qMdR3FEZaFXRiwfj8UvYl34YoZtvGnsroQc+teUlB+Q5o+f JJvGi5AbdXh0pW9kT6jVcy04sBZgt7sl6nJy6TK0Ia6FCMfQMqqUxLOxfdppLWep2BaZ jz654+Quvr2DjWY0ZcsCUCC3O2TwW2vbVwopziClByqKPgE+3KG2imbfjKzThpq9PVdA ixAzk8nosRwsRQ09CWM4hC6eV4ZNaSMQr+VJjTYxOz4UNP9E8hesyJLXjankhhBU5B9b GOyF7U1AFiOYRSCl7ICuSFdU7OTZMXlE7l2cGJM2uIzBpj59ql7Kl+OIJiqgSrdMgSvU DkmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ZmFsQnbO; 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id t4-20020a170906a10400b009888e0923cfsi9889444ejy.712.2023.08.09.11.16.00 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 11:16:00 -0700 (PDT) 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=ZmFsQnbO; 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 D5D723858291 for <ouuuleilei@gmail.com>; Wed, 9 Aug 2023 18:15:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5D723858291 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691604959; bh=wGW4ezNfcz3uNwnodbLJz1LBzJUIxSvGF/gVuLXEK/Y=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=ZmFsQnbObG1wDYKDDgVyhnAhqvuc5WDkoeESS7AhX1x5cib1k7anKZgGuqEkPxwSP OrYc6SZJsvj0htQcVBJvZRgdQ6jpJtJu0uUgT5yvVh5X+un35LtZY/yHl8F7Pf/IL8 2l9pgEf9Pa019uftq3EMd1n5ihuxnJocaRU+Fyvs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 6B6B13857B9B for <gcc-patches@gcc.gnu.org>; Wed, 9 Aug 2023 18:15:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6B6B13857B9B Received: from mimecast-mx02.redhat.com (66.187.233.73 [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-668-fPeziPWvMcGAtFrPwAABVw-1; Wed, 09 Aug 2023 14:15:16 -0400 X-MC-Unique: fPeziPWvMcGAtFrPwAABVw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9D77F3C1350C; Wed, 9 Aug 2023 18:15:16 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 617A240C2076; Wed, 9 Aug 2023 18:15:16 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 379IFDBk2042868 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 20:15:14 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 379IFDaW2042867; Wed, 9 Aug 2023 20:15:13 +0200 Date: Wed, 9 Aug 2023 20:15:13 +0200 To: Richard Biener <rguenther@suse.de> Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 1/12] expr: Small optimization [PR102989] Message-ID: <ZNPXsZL3/mmxuDT5@tucnak> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Jakub Jelinek via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Jakub Jelinek <jakub@redhat.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773776363431104261 X-GMAIL-MSGID: 1773776363431104261 |
Series |
GCC _BitInt support [PR102989]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Jakub Jelinek
Aug. 9, 2023, 6:15 p.m. UTC
Hi! Small optimization to avoid testing modifier multiple times. 2023-08-09 Jakub Jelinek <jakub@redhat.com> PR c/102989 * expr.cc (expand_expr_real_1) <case MEM_REF>: Add an early return for EXPAND_WRITE or EXPAND_MEMORY modifiers to avoid testing it multiple times. Jakub
Comments
On Wed, 9 Aug 2023, Jakub Jelinek wrote: > Hi! > > Small optimization to avoid testing modifier multiple times. OK. Richard. > 2023-08-09 Jakub Jelinek <jakub@redhat.com> > > PR c/102989 > * expr.cc (expand_expr_real_1) <case MEM_REF>: Add an early return for > EXPAND_WRITE or EXPAND_MEMORY modifiers to avoid testing it multiple > times. > > --- gcc/expr.cc.jj 2023-08-08 15:55:06.499164554 +0200 > +++ gcc/expr.cc 2023-08-08 15:59:36.594382141 +0200 > @@ -11248,17 +11248,15 @@ expand_expr_real_1 (tree exp, rtx target > set_mem_addr_space (temp, as); > if (TREE_THIS_VOLATILE (exp)) > MEM_VOLATILE_P (temp) = 1; > - if (modifier != EXPAND_WRITE > - && modifier != EXPAND_MEMORY > - && !inner_reference_p > + if (modifier == EXPAND_WRITE || modifier == EXPAND_MEMORY) > + return temp; > + if (!inner_reference_p > && mode != BLKmode > && align < GET_MODE_ALIGNMENT (mode)) > temp = expand_misaligned_mem_ref (temp, mode, unsignedp, align, > modifier == EXPAND_STACK_PARM > ? NULL_RTX : target, alt_rtl); > - if (reverse > - && modifier != EXPAND_MEMORY > - && modifier != EXPAND_WRITE) > + if (reverse) > temp = flip_storage_order (mode, temp); > return temp; > } > > Jakub > >
--- gcc/expr.cc.jj 2023-08-08 15:55:06.499164554 +0200 +++ gcc/expr.cc 2023-08-08 15:59:36.594382141 +0200 @@ -11248,17 +11248,15 @@ expand_expr_real_1 (tree exp, rtx target set_mem_addr_space (temp, as); if (TREE_THIS_VOLATILE (exp)) MEM_VOLATILE_P (temp) = 1; - if (modifier != EXPAND_WRITE - && modifier != EXPAND_MEMORY - && !inner_reference_p + if (modifier == EXPAND_WRITE || modifier == EXPAND_MEMORY) + return temp; + if (!inner_reference_p && mode != BLKmode && align < GET_MODE_ALIGNMENT (mode)) temp = expand_misaligned_mem_ref (temp, mode, unsignedp, align, modifier == EXPAND_STACK_PARM ? NULL_RTX : target, alt_rtl); - if (reverse - && modifier != EXPAND_MEMORY - && modifier != EXPAND_WRITE) + if (reverse) temp = flip_storage_order (mode, temp); return temp; }