[#1/7] allow vuses in ifcombine blocks (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)
Message ID | orwmhwv1u6.fsf_-_@lxoliva.fsfla.org |
---|---|
State | Committed |
Commit | 8e6a25b01becf449d54154b7e83de5f4955cba37 |
Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 64B9C3858280 for <patchwork@sourceware.org>; Fri, 25 Oct 2024 14:40:14 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by sourceware.org (Postfix) with ESMTPS id 1BCB03858D39 for <gcc-patches@gcc.gnu.org>; Fri, 25 Oct 2024 14:39:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1BCB03858D39 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1BCB03858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729867159; cv=none; b=SHmItnywq2iG8RPzYEVyUnVomkEHlXJ3bHOt8X75NZmYv3tDcA0QzXg/TtzSY/PbIMRxNyk2dVvh7Zh/Obc5M/M7usXE5RxsDomfDn8rdTlerdP9finWbjIKV7IXzMOpZydoGQNslRdrny8LJv4QirfW5eSLIgXBsSSkSddbtTg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729867159; c=relaxed/simple; bh=puhx2WYrsXAqA+bGunzr0fxxOzUMVMhV6FKrMmRwqFw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=L8s0TSbljbiz5lmHfD2Fz0Es0zEKaKfywJwUsYJhJqRLZpWs8tIaSOQ/OQIFTLYsDk2BbMAZpNPiOWldJO1RkhXNTApR1nhrB6Xno8dx+NmuBQBm4skhDSfovQxqLrGI5pmbqv/Pqz7VOBdnshIVZheagAfcdrNPK6ogLfOro+Q= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-7edb6879196so1178409a12.3 for <gcc-patches@gcc.gnu.org>; Fri, 25 Oct 2024 07:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1729867143; x=1730471943; darn=gcc.gnu.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bCVjSxey+jsqWWkKBP00zz2DSBTuQMi6mCOFfUWdaEk=; b=hPti7yOBXZDJkFskjAHYxloie6PzzSRth/pOdo7yCEBRSbjZGIJCesAoprqT7j0IjR UQkMgvJl5d6zddlu+2pasvZ53cJp01Xlwh2nfTxK7p2n8HcyIMqIHVPMn0410PIZ8791 tHy/9P6S9Qty6A0Nvf9VSDZ/wpn51PwyGIgLyA8nN1rO+/lZQ3yC6OhSh0BAUPQGnVFU 0iG1txMDVa3jnWkFMeAxC1C/BRLHPhDnMzP9lGYuw30B3phoS3Dr5+m1Er+vb053D2rD 6PEy7rBUAGHRcZn3OWqhSXDy6JNwOQf8yGntw4lOPPoN0RowY01Bq1pPaZLiKbYWUhv7 SohA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729867143; x=1730471943; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bCVjSxey+jsqWWkKBP00zz2DSBTuQMi6mCOFfUWdaEk=; b=GlvpYIpdNQB4w0CsyHIab5Vf/yQG0RzVz5FTBTSkc4BNccMB575exosJlO5TA60rdZ DQD4+EhyVz7SwHMhCrbrea+Uy46uopubS91Jll1VZ+xTEaAmSpI5aZOJxi5PkRezsc54 dazzqwqkZ97ESENBxB+85uoVpYShFREs0VjQwf8CfdopMa7G6uTEW5EcMEbqRolVQth7 fD7bOi/Hk8acTJtB35WLD+oRLQbufj0KjPVm5q/de78eSJU6VrQCH+QTfo90guAYwNSA 9O+W6ZHb4xX4TqqvknQg0nVSOlDuB0q89auOvkecsTZcbXfFuS0XxGmn1zQ/1OUBQdQc Xq8g== X-Gm-Message-State: AOJu0YwLXIZhExBtEJykZNmRnLcpaAVavSiAzBFCma5STZ/o6+b9ZpXC mHp/8iKzrYakKChvyM8JP0K/CtGPRI8+I7C8iU+Ox336yi6Em784PkY3GiHdJjyL6rP/q8R6fnu jow== X-Google-Smtp-Source: AGHT+IFxBQzCjrMZu5HEPiYvBSGMGx2hG+JMuRQTIn6hUlePp7BKw18COJb6LD7lA389nDTnbuZIeA== X-Received: by 2002:a05:6a20:ac43:b0:1d5:2b7f:d2f8 with SMTP id adf61e73a8af0-1d989a30ab4mr8126898637.13.1729867142898; Fri, 25 Oct 2024 07:39:02 -0700 (PDT) Received: from free.home ([2804:14c:4d1:44a5::1002]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7205791d9basm1123267b3a.43.2024.10.25.07.39.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 07:39:02 -0700 (PDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 49PBo9P31633735 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 25 Oct 2024 08:50:10 -0300 From: Alexandre Oliva <oliva@adacore.com> To: Richard Biener <richard.guenther@gmail.com> Cc: GCC Patches <gcc-patches@gcc.gnu.org> Subject: [PATCH #1/7] allow vuses in ifcombine blocks (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine) Organization: Free thinker, does not speak for AdaCore References: <or1riqasdy.fsf@livre.home> <CAFiYyc1y4np56TDBQBnwzMSSt5AJjwCbMDrRWYiTJXGcqcvbtg@mail.gmail.com> <ora6x959mz.fsf@livre.home> <CAFiYyc2_OKHxwx1R7H91d6yc+Q+0QPbuLAC=7Y7wAGPmk8wRjg@mail.gmail.com> <or1rik68ad.fsf@livre.home> <CAFiYyc01+MvFHih6ZtSmwOCbE=anZLCUYXituEAFVn9Ox4ZRTg@mail.gmail.com> <or7ds9yq4r.fsf@livre.home> <oro74avly7.fsf_-_@lxoliva.fsfla.org> <CAFiYyc0+aOVqFE62pGVUerffJe7Jm3yNtOdx0iU49K-zEQ=3NA@mail.gmail.com> <orv7xmb32q.fsf@lxoliva.fsfla.org> <CAFiYyc03TVYm9z=FoVAmBDFTpr6=c-s44bOERgZaVwOvBNBFCw@mail.gmail.com> <or1q04wie6.fsf@lxoliva.fsfla.org> Date: Fri, 25 Oct 2024 08:50:09 -0300 In-Reply-To: <or1q04wie6.fsf@lxoliva.fsfla.org> (Alexandre Oliva's message of "Fri, 25 Oct 2024 08:07:13 -0300") Message-ID: <orwmhwv1u6.fsf_-_@lxoliva.fsfla.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, WEIRD_QUOTING 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.30 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> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
Series |
[#1/7] allow vuses in ifcombine blocks (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)
|
|
Commit Message
Alexandre Oliva
Oct. 25, 2024, 11:50 a.m. UTC
Disallowing vuses in blocks for ifcombine is too strict, and it prevents usefully moving fold_truth_andor into ifcombine. That tree-level folder has long ifcombined loads, absent other relevant side effects. for gcc/ChangeLog * tree-ssa-ifcombine.c (bb_no_side_effects_p): Allow vuses, but not vdefs. --- gcc/tree-ssa-ifcombine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 10/25/24 5:50 AM, Alexandre Oliva wrote: > > Disallowing vuses in blocks for ifcombine is too strict, and it > prevents usefully moving fold_truth_andor into ifcombine. That > tree-level folder has long ifcombined loads, absent other relevant > side effects. > > > for gcc/ChangeLog > > * tree-ssa-ifcombine.c (bb_no_side_effects_p): Allow vuses, > but not vdefs. OK jeff
On Fri, Oct 25, 2024 at 4:39 PM Alexandre Oliva <oliva@adacore.com> wrote: > > > Disallowing vuses in blocks for ifcombine is too strict, and it > prevents usefully moving fold_truth_andor into ifcombine. That > tree-level folder has long ifcombined loads, absent other relevant > side effects. OK. Richard. > > for gcc/ChangeLog > > * tree-ssa-ifcombine.c (bb_no_side_effects_p): Allow vuses, > but not vdefs. > --- > gcc/tree-ssa-ifcombine.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/tree-ssa-ifcombine.cc b/gcc/tree-ssa-ifcombine.cc > index 6a3bc99190d9e..ed20a231951a3 100644 > --- a/gcc/tree-ssa-ifcombine.cc > +++ b/gcc/tree-ssa-ifcombine.cc > @@ -129,7 +129,7 @@ bb_no_side_effects_p (basic_block bb) > enum tree_code rhs_code; > if (gimple_has_side_effects (stmt) > || gimple_could_trap_p (stmt) > - || gimple_vuse (stmt) > + || gimple_vdef (stmt) > /* We need to rewrite stmts with undefined overflow to use > unsigned arithmetic but cannot do so for signed division. */ > || ((ass = dyn_cast <gassign *> (stmt)) > > > -- > Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ > Free Software Activist GNU Toolchain Engineer > More tolerance and less prejudice are key for inclusion and diversity > Excluding neuro-others for not behaving ""normal"" is *not* inclusive
diff --git a/gcc/tree-ssa-ifcombine.cc b/gcc/tree-ssa-ifcombine.cc index 6a3bc99190d9e..ed20a231951a3 100644 --- a/gcc/tree-ssa-ifcombine.cc +++ b/gcc/tree-ssa-ifcombine.cc @@ -129,7 +129,7 @@ bb_no_side_effects_p (basic_block bb) enum tree_code rhs_code; if (gimple_has_side_effects (stmt) || gimple_could_trap_p (stmt) - || gimple_vuse (stmt) + || gimple_vdef (stmt) /* We need to rewrite stmts with undefined overflow to use unsigned arithmetic but cannot do so for signed division. */ || ((ass = dyn_cast <gassign *> (stmt))