public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Richard Guenther <rguenther@suse.de>
Cc: Ira Rosen <IRAR@il.ibm.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH][RFC] Clean up STMT_VINFO_VECTYPE
Date: Tue, 26 Oct 2010 18:30:00 -0000	[thread overview]
Message-ID: <AANLkTimjJM2_JH10JnQJcuzuRh=_KAJQXg4QtLF6gZph@mail.gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1004091234140.5522@zhemvz.fhfr.qr>

On Fri, Apr 9, 2010 at 3:35 AM, Richard Guenther <rguenther@suse.de> wrote:
> On Mon, 1 Mar 2010, Ira Rosen wrote:
>
>> Richard Guenther <rguenther@suse.de> wrote on 25/02/2010 07:05:10 PM:
>>
>> > This cleans up the semantic of STMT_VINFO_VECTYPE to be always the
>> > vector type of the LHS of the statement.  This allows to get rid
>> > of a lot of vector type constructions in the various vectorization
>> > routines.  Which makes it way easier for me to add support for
>> > multiple vector sizes to the vectorizer as I can restrict setting
>> > vector types to a central analysis place.
>> >
>> > The biggest part of the patch is re-ordering of tests in the
>> > analysis/transform functions where we have to call
>> > vect_is_simple_use_1 to get the input vector type(s).  This new
>> > function can now simply look up the definition statement and
>> > return its STMT_VINFO_VECTYPE, something previously not possible
>> > (For non-loop related definitions the analysis/transform function
>> > is still responsible for choosing a proper vector type - but
>> > that's something most already do or should be easy to add.  In
>> > the patch I simply fall back to the old method for now)
>> >
>> > Thus, this is part 1 of a series to teach the vectorizer about
>> > AVX 16/32 byte mixed vector sizes.  It's a cleanup that looked
>> > obvious anyway, too.
>> >
>> > Bootstrap and regtest running on x86_64-unknown-linux-gnu.
>> >
>> > Does this look reasonable for 4.6?  I'd appreciate testing
>> > on powerpc in case I missed some paths not excercised by x86_64/i?86.
>>
>> Looks good to me.
>> I tested with vectorization testsuite on powerpc. I am now running the
>> whole testsuite, will let you know if anything goes wrong.
>
> I have now merged some of the later changes into this patch (the
> introduction of get_same_sized_vectype) so I need to touch the
> same place only once.
>
> Re-bootstrapped and tested on x86_64-unknown-linux-gnu, committed
> to trunk as follows.
>
> Richard.
>
> 2010-04-09  Richard Guenther  <rguenther@suse.de>
>
>        * tree-vectorizer.h (struct _stmt_vec_info): Document
>        that vectype is the type of the LHS.
>        (supportable_widening_operation, supportable_narrowing_operation):
>        Get both input and output vector types as arguments.
>        (vect_is_simple_use_1): Declare.
>        (get_same_sized_vectype): Likewise.
>        * tree-vect-loop.c (vect_determine_vectorization_factor):
>        Set STMT_VINFO_VECTYPE to the vector type of the def.
>        (vectorizable_reduction): Adjust.
>        * tree-vect-patterns.c (vect_recog_widen_mult_pattern):
>        Adjust.  Specify the output vector type.
>        (vect_pattern_recog_1): Adjust.
>        * tree-vect-stmts.c (get_same_sized_vectype): New function.
>        (vectorizable_call): Adjust.
>        (vectorizable_conversion): Likewise.
>        (vectorizable_operation): Likewise.
>        (vectorizable_type_demotion): Likewise.
>        (vectorizable_type_promotion): Likewise.
>        (vect_analyze_stmt): Set STMT_VINFO_VECTYPE to the vector type of
>        the def.
>        (vect_is_simple_use_1): New function.
>        (supportable_widening_operation): Get both input and output
>        vector types.
>        (supportable_narrowing_operation): Likewise.
>        * tree-vect-slp.c (vect_schedule_slp_instance): Adjust.

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46184



H.J.

      reply	other threads:[~2010-10-26 16:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-25 18:16 Richard Guenther
2010-03-01 10:26 ` Ira Rosen
2010-04-09 10:35   ` Richard Guenther
2010-10-26 18:30     ` H.J. Lu [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='AANLkTimjJM2_JH10JnQJcuzuRh=_KAJQXg4QtLF6gZph@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=IRAR@il.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).