public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: "Kewen.Lin" <linkw@linux.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Bill Schmidt <wschmidt@linux.ibm.com>,
	David Edelsohn <dje.gcc@gmail.com>,
	Richard Biener <richard.guenther@gmail.com>,
	will schmidt <will_schmidt@vnet.ibm.com>
Subject: Re: [PATCH 2/2 v2] rs6000: Guard density_test only for vector version
Date: Mon, 10 May 2021 15:12:21 -0500	[thread overview]
Message-ID: <20210510201221.GB10366@gate.crashing.org> (raw)
In-Reply-To: <8e75f918-a985-0d2e-ed2b-26f4c72ff74d@linux.ibm.com>

Hi!

On Sat, May 08, 2021 at 04:12:18PM +0800, Kewen.Lin wrote:
> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -5234,6 +5234,8 @@ typedef struct _rs6000_cost_data
>    /* For each vectorized loop, this var holds TRUE iff a non-memory vector
>       instruction is needed by the vectorization.  */
>    bool vect_nonmem;
> +  /* Indicates costing for the scalar version of a loop or block.  */
> +  bool costing_for_scalar;
>  } rs6000_cost_data;

"... this is costing for ..."?

> @@ -5255,6 +5257,12 @@ rs6000_density_test (rs6000_cost_data *data)
>    int vec_cost = data->cost[vect_body], not_vec_cost = 0;
>    int i, density_pct;
>  
> +  /* This density test only cares about the cost of vector version of the
> +     loop, early return if it's costing for the scalar version (namely
> +     computing single scalar iteration cost).  */
> +  if (data->costing_for_scalar)
> +    return;

"..., so immediately return if we are passed costing for ..."?

The patch is okay for trunk with those or similar changes.  Thanks!


Segher

  reply	other threads:[~2021-05-10 20:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07  2:28 [PATCH] rs6000: Make " Kewen.Lin
2021-05-07  9:43 ` Richard Biener
2021-05-08  8:05   ` [PATCH 1/2] vect: Add costing_for_scalar parameter to init_cost hook Kewen.Lin
2021-05-10 13:55     ` Richard Biener
2021-05-11  7:10       ` Kewen.Lin
2021-05-11  7:54         ` Richard Biener
2021-05-11 10:50           ` Kewen.Lin
2021-05-11 11:59             ` Richard Biener
2021-05-13  7:04               ` Kewen.Lin
2021-05-17  8:55                 ` Richard Biener
2021-05-17  9:24                   ` Kewen.Lin
2021-05-10 14:08     ` Richard Sandiford
2021-05-11  7:18       ` Kewen.Lin
2021-05-07 11:43 ` [PATCH] rs6000: Make density_test only for vector version will schmidt
2021-05-08  8:47   ` Kewen.Lin
2021-05-08  8:12 ` [PATCH 2/2 v2] rs6000: Guard " Kewen.Lin
2021-05-10 20:12   ` Segher Boessenkool [this message]
2021-05-11  7:20     ` Kewen.Lin

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=20210510201221.GB10366@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linkw@linux.ibm.com \
    --cc=richard.guenther@gmail.com \
    --cc=will_schmidt@vnet.ibm.com \
    --cc=wschmidt@linux.ibm.com \
    /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).