public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Jeff Law <law@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Richard Sandiford <richard.sandiford@arm.com>
Subject: Re: [5/6] Insert pattern statements into vec_basic_blocks
Date: Wed, 29 Aug 2018 07:18:00 -0000	[thread overview]
Message-ID: <CAFiYyc0FzVpuC_=LhKsWKjbNkjO_EyswTasoaee6JT=_fF+=hw@mail.gmail.com> (raw)
In-Reply-To: <bf951ae5-17af-a2e4-a3ae-7bce641f86f5@redhat.com>

On Wed, Aug 29, 2018 at 1:16 AM Jeff Law <law@redhat.com> wrote:
>
> On 08/28/2018 05:24 AM, Richard Sandiford wrote:
> > The point of this patch is to put pattern statements in the same
> > vec_basic_block as the statements they replace, with the pattern
> > statements for S coming between S and S's original predecessor.
> > This removes the need to handle them specially in various places.
> >
> >
> > 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
> >
> > gcc/
> >       * tree-vectorizer.h (vec_basic_block): Expand comment.
> >       (_stmt_vec_info::pattern_def_seq): Delete.
> >       (STMT_VINFO_PATTERN_DEF_SEQ): Likewise.
> >       (is_main_pattern_stmt_p): New function.
> >       * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Rename to...
> >       (vect_determine_vf_for_stmt): ...this, deleting the original
> >       function with this name.  Remove vectype_maybe_set_p argument
> >       and test is_pattern_stmt_p instead.  Retain the "examining..."
> >       message from the previous vect_determine_vf_for_stmt.
> >       (vect_compute_single_scalar_iteration_cost, vect_update_vf_for_slp)
> >       (vect_analyze_loop_2): Don't treat pattern statements specially.
> >       (vect_transform_loop): Likewise.  Use vect_orig_stmt to find the
> >       insertion point.
> >       * tree-vect-slp.c (vect_detect_hybrid_slp): Expect pattern statements
> >       to be in the statement list, without needing to follow
> >       STMT_VINFO_RELATED_STMT.  Remove PATTERN_DEF_SEQ handling.
> >       * tree-vect-stmts.c (vect_analyze_stmt): Don't handle pattern
> >       statements specially.
> >       (vect_remove_dead_scalar_stmts): Ignore pattern statements.
> >       * tree-vect-patterns.c (vect_set_pattern_stmt): Insert the pattern
> >       statement into the vec_basic_block immediately before the statement
> >       it replaces.
> >       (append_pattern_def_seq): Likewise.  If the original statement is
> >       itself a pattern statement, associate the new one with the original
> >       statement.
> >       (vect_split_statement): Use append_pattern_def_seq to insert the
> >       first pattern statement.
> >       (vect_recog_vector_vector_shift_pattern): Remove mention of
> >       STMT_VINFO_PATTERN_DEF_SEQ.
> >       (adjust_bool_stmts): Get the last pattern statement from the
> >       stmt_vec_info chain.
> >       (vect_mark_pattern_stmts): Rename to...
> >       (vect_replace_stmt_with_pattern): ...this.  Remove the
> >       PATTERN_DEF_SEQ handling and process only the pattern statement given.
> >       Use append_pattern_def_seq when replacing a pattern statement with
> >       another pattern statement, and use vec_basic_block::remove instead
> >       of gsi_remove to remove the old one.
> >       (vect_pattern_recog_1): Update accordingly.  Remove PATTERN_DEF_SEQ
> >       handling.  On failure, remove any half-formed pattern sequence from
> >       the vec_basic_block.  Install the vector type in pattern statements
> >       that don't yet have one.
> >       (vect_pattern_recog): Iterate over statements that are added
> >       by previous recognizers, but skipping those that have already
> >       been replaced, or the main pattern statement in such a replacement.
> Nice cleanup.  OK.

What I wonder is if this direction eventually allows us to get rid of all the
code that deals with pattern stmts not having SSA operands or immediate
uses?  Or is that already gone...?

Richard.

> jeff

  reply	other threads:[~2018-08-29  7:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28 11:19 [0/6] Make vector pattern statements less special Richard Sandiford
2018-08-28 11:20 ` [1/6] Handle gphis in gimple_get_lhs Richard Sandiford
2018-08-28 18:22   ` Jeff Law
2018-08-28 11:21 ` [2/6] Make vec_info::lookup_single_use take a stmt_vec_info Richard Sandiford
2018-08-28 18:25   ` Jeff Law
2018-08-28 11:22 ` [3/6] Add a vec_basic_block structure Richard Sandiford
2018-08-28 22:38   ` Jeff Law
2018-08-28 11:23 ` [4/6] Make the vectoriser do its own DCE Richard Sandiford
2018-08-28 23:01   ` Jeff Law
2018-08-29  7:16     ` Richard Biener
2018-08-28 11:25 ` [6/6] Link imm uses for pattern stmts Richard Sandiford
2018-08-29  7:43   ` Richard Biener
2018-08-29  9:25     ` Richard Sandiford
2018-08-30 10:24       ` Richard Biener
2018-08-28 11:25 ` [5/6] Insert pattern statements into vec_basic_blocks Richard Sandiford
2018-08-28 23:16   ` Jeff Law
2018-08-29  7:18     ` Richard Biener [this message]
2018-08-29  7:55   ` Jakub Jelinek
2018-08-29  8:59     ` Richard Sandiford
2018-08-29  9:10       ` Jakub Jelinek
2018-08-29  9:22         ` Richard Biener
2018-08-29  9:38           ` Richard Sandiford

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='CAFiYyc0FzVpuC_=LhKsWKjbNkjO_EyswTasoaee6JT=_fF+=hw@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=richard.sandiford@arm.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).