public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Andrew Pinski <apinski@marvell.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 1/2] PHIOPT: small cleanup in match_simplify_replacement
Date: Tue, 18 Apr 2023 08:24:01 +0200	[thread overview]
Message-ID: <CAFiYyc1bNqfzj5oBdk6vJew+Rmp8gVcrc7NNY1q7w19H6-wYDg@mail.gmail.com> (raw)
In-Reply-To: <20230417221740.251864-1-apinski@marvell.com>

On Tue, Apr 18, 2023 at 12:18 AM Andrew Pinski via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> We know that the statement we are moving is already
> have a SSA_NAME on the lhs so we don't need to
> check that and can also just call reset_flow_sensitive_info
> with the name we already got.
>
> OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

OK.

> gcc/ChangeLog:
>
>         * tree-ssa-phiopt.cc (match_simplify_replacement):
>         Simplify code that does the movement slightly.
> ---
>  gcc/tree-ssa-phiopt.cc | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc
> index 16acd2f1894..4ddb4d5db90 100644
> --- a/gcc/tree-ssa-phiopt.cc
> +++ b/gcc/tree-ssa-phiopt.cc
> @@ -1094,11 +1094,10 @@ match_simplify_replacement (basic_block cond_bb, basic_block middle_bb,
>
>        tree name = gimple_get_lhs (stmt_to_move);
>        // Mark the name to be renamed if there is one.
> -      if (name && TREE_CODE (name) == SSA_NAME)
> -       bitmap_set_bit (inserted_exprs, SSA_NAME_VERSION (name));
> +      bitmap_set_bit (inserted_exprs, SSA_NAME_VERSION (name));
>        gimple_stmt_iterator gsi1 = gsi_for_stmt (stmt_to_move);
>        gsi_move_before (&gsi1, &gsi);
> -      reset_flow_sensitive_info (gimple_assign_lhs (stmt_to_move));
> +      reset_flow_sensitive_info (name);
>      }
>
>    replace_phi_edge_with_variable (cond_bb, e1, phi, result, inserted_exprs);
> --
> 2.31.1
>

      parent reply	other threads:[~2023-04-18  6:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 22:17 Andrew Pinski
2023-04-17 22:17 ` [PATCH 2/2] PHIOPT: add folding/simplification detail to the dump Andrew Pinski
2023-04-18  6:24   ` Richard Biener
2023-04-18  6:24 ` Richard Biener [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFiYyc1bNqfzj5oBdk6vJew+Rmp8gVcrc7NNY1q7w19H6-wYDg@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=apinski@marvell.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).