public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@arm.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [9/n] PR85694: Add a vect_look_through_pattern helper
Date: Wed, 20 Jun 2018 10:24:00 -0000	[thread overview]
Message-ID: <87r2l1eoxk.fsf@arm.com> (raw)
In-Reply-To: <CAFiYyc3XUhYnFU7uiJeMbkyetZYm9PjM7rDpZz_wALO=aNq_gQ@mail.gmail.com>	(Richard Biener's message of "Tue, 19 Jun 2018 12:11:57 +0200")

Richard Biener <richard.guenther@gmail.com> writes:
> On Mon, Jun 18, 2018 at 5:04 PM Richard Sandiford
> <richard.sandiford@arm.com> wrote:
>>
>> When following the definitions of SSA names, some recognisers
>> already cope with statements that have been replaced by patterns.
>> This patch makes that happen automatically for users of
>> type_conversion_p and vect_get_internal_def.  It also adds
>> a vect_look_through_pattern helper that can be used directly.
>>
>> The reason for doing this is that the main patch for PR85694
>> makes over_widening handle more general cases.  These over-widened
>> patterns can still be useful when matching later statements;
>> e.g. an overwidened MULT_EXPR could be the input to a DOT_PROD_EXPR.
>>
>> The patch doesn't do anything with the STMT_VINFO_IN_PATTERN_P checks
>> in vect_recog_over_widening_pattern or vect_recog_widen_shift_pattern
>> since later patches rewrite them anyway.
>>
>> Doing this fixed an XFAIL in vect-reduc-dot-u16b.c.
>>
>> Tested on aarch64-linux-gnu and x86_64-linux-gnu.  OK to install?
>
> Hmm.  It seems to me that *def_stmt for vect_is_simple_use should
> eventually be the pattern def given the vectype overload takes the
> vectype from the pattern def already but oddly enough the
> DEF_TYPE is taken from the non-pattern stmt.
>
> I wonder which callers look at def_stmt at all (and how...)
>
> I guess swapping the def_stmt and dt arguments and adding yet another
> overload to remove all unused &def_stmt args might this easier to review...
>
> So - I'm suggesting to change vect_is_simple_use.

OK, I'll try that.  Might end up being its own mini-series. :-)

I'll post the next set of patches anyway since they don't depend
on *how* this is fixed, just that it is.

Thanks,
Richard


  reply	other threads:[~2018-06-20 10:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 15:04 Richard Sandiford
2018-06-19 10:12 ` Richard Biener
2018-06-20 10:24   ` Richard Sandiford [this message]
2018-06-27  9:31     ` [9a/n] PR85694: Reorder vect_is_simple_use arguments Richard Sandiford
2018-06-28  9:55       ` Richard Biener
2018-06-27  9:34     ` [9b/n] PR85694: Make vect_is_simple_use look through pattern statements Richard Sandiford
2018-06-28  9:57       ` Richard Biener

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=87r2l1eoxk.fsf@arm.com \
    --to=richard.sandiford@arm.com \
    --cc=gcc-patches@gcc.gnu.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).