public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@arm.com>
To: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Cc: Richard Biener <richard.guenther@gmail.com>,
	 gcc Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [SVE] PR86753
Date: Fri, 23 Aug 2019 14:34:00 -0000	[thread overview]
Message-ID: <mptwof4vujx.fsf@arm.com> (raw)
In-Reply-To: <CAAgBjMkX786wQ2CgtBOTTY_ejD1Zp=KfmAnT08NFkDtNe3ZLJA@mail.gmail.com>	(Prathamesh Kulkarni's message of "Fri, 23 Aug 2019 19:29:38 +0530")

Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> writes:
> On Fri, 23 Aug 2019 at 18:15, Richard Sandiford
> <richard.sandiford@arm.com> wrote:
>>
>> Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> writes:
>> > On Thu, 22 Aug 2019 at 16:44, Richard Biener <richard.guenther@gmail.com> wrote:
>> >> It looks a bit odd to me.  I'd have expected it to work by generating
>> >> the stmts as before in the vectorizer and then on the stmts we care
>> >> invoke vn_visit_stmt that does both value-numbering and elimination.
>> >> Alternatively you could ask the VN state to generate the stmt for
>> >> you via vn_nary_build_or_lookup () (certainly that needs a bit more
>> >> work).  One complication might be availability if you don't value-number
>> >> all stmts in the block, but well.  I'm not sure constraining to a single
>> >> block is necessary - I've thought of having a "CSE"ing gimple_build
>> >> for some time (add & CSE new stmts onto a sequence), so one
>> >> should keep this mode in mind when designing the one working on
>> >> an existing BB.  Note as you write it it depends on visiting the
>> >> stmts in proper order - is that guaranteed when for example
>> >> vectorizing SLP?
>> > Hi,
>> > Indeed, I wrote the function with assumption that, stmts would be
>> > visited in proper order.
>> > This doesn't affect SLP currently, because call to vn_visit_stmt in
>> > vect_transform_stmt is
>> > conditional on cond_to_vec_mask, which is only allocated inside
>> > vect_transform_loop.
>> > But I agree we could make it more general.
>> > AFAIU, the idea of constraining VN to single block was to avoid using defs from
>> > non-dominating scalar stmts during outer-loop vectorization.
>>
>> Maybe we could do the numbering in a separate walk immediately before
>> the transform phase instead.
> Um sorry, I didn't understand. Do you mean we should do dom based VN
> just before transform phase
> or run full VN ?

No, I just meant that we could do a separate walk of the contents
of the basic block:

> @@ -8608,6 +8609,8 @@ vect_transform_loop (loop_vec_info loop_vinfo)
>      {
>        basic_block bb = bbs[i];
>        stmt_vec_info stmt_info;
> +      vn_bb_init (bb);
> +      loop_vinfo->cond_to_vec_mask = new cond_vmask_map_type (8);
> 

...here, rather than doing it on the fly during vect_transform_stmt
itself.  The walk should be gated on LOOP_VINFO_FULLY_MASKED_P so that
others don't have to pay the compile-time penalty.  (Same for
cond_to_vec_mask itself really.)

Thanks,
Richard

  reply	other threads:[~2019-08-23 14:13 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-14 15:53 Prathamesh Kulkarni
2019-08-14 16:59 ` Richard Biener
2019-08-14 17:01   ` Richard Biener
2019-08-14 21:22     ` Richard Sandiford
2019-08-21 20:10       ` Prathamesh Kulkarni
2019-08-22 12:05         ` Richard Biener
2019-08-23 12:46           ` Prathamesh Kulkarni
2019-08-23 13:47             ` Richard Sandiford
2019-08-23 14:30               ` Prathamesh Kulkarni
2019-08-23 14:34                 ` Richard Sandiford [this message]
2019-08-26  5:59                   ` Prathamesh Kulkarni
2019-08-26 11:46                     ` Richard Biener
2019-08-26 13:39                       ` Prathamesh Kulkarni
2019-08-27 10:41                         ` Richard Sandiford
2019-08-27 11:31                           ` Richard Biener
2019-08-27 12:52                             ` Richard Sandiford
2019-08-27 15:55                               ` Prathamesh Kulkarni
2019-08-27 17:39                                 ` Richard Sandiford
2019-08-27 20:10                                   ` Prathamesh Kulkarni
2019-08-28  9:42                                     ` Richard Sandiford
2019-08-30 12:09                                       ` Richard Biener
2019-08-31 16:56                                         ` Prathamesh Kulkarni
2019-09-05  9:00                                           ` Richard Sandiford
2019-09-05 12:51                                             ` Prathamesh Kulkarni
2019-09-09 11:15                                               ` Richard Sandiford
2019-09-09 16:37                                                 ` Prathamesh Kulkarni
2019-09-09 20:56                                                   ` Prathamesh Kulkarni
2019-09-10 12:20                                                     ` Richard Sandiford
2019-09-10 13:35                                                     ` Matthew Malcomson
2019-09-10 21:36                                                       ` Prathamesh Kulkarni
2019-09-16 15:54                                                   ` Prathamesh Kulkarni
2019-09-25 16:18                                                     ` Prathamesh Kulkarni
2019-10-02 23:42                                                       ` Prathamesh Kulkarni
2019-10-04 10:38                                                         ` Richard Biener
2019-10-08  0:10                                                           ` Prathamesh Kulkarni
2019-10-08  7:51                                                             ` Richard Sandiford
2019-10-09  3:23                                                               ` Prathamesh Kulkarni
2019-10-15  6:11                                                                 ` Prathamesh Kulkarni
2019-10-15 11:40                                                                   ` Richard Biener
2019-10-16 12:13                                                                     ` Richard Sandiford
2019-10-18  5:20                                                                       ` Prathamesh Kulkarni

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=mptwof4vujx.fsf@arm.com \
    --to=richard.sandiford@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=prathamesh.kulkarni@linaro.org \
    --cc=richard.guenther@gmail.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).