public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dorit Nuzman <DORIT@il.ibm.com>
To: Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [patch] vectorizer cleanups (and prep for outer-loop vectorization) -  part 3/5
Date: Sat, 14 Apr 2007 18:54:00 -0000	[thread overview]
Message-ID: <OFD27DDD53.8CA42757-ONC22572BD.0047E4B1-C22572BD.0065BFFC@il.ibm.com> (raw)
In-Reply-To: <20070412121122.GA8089@atrey.karlin.mff.cuni.cz>

Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> wrote on 12/04/2007
15:11:22:

> > *************** vect_is_simple_use (tree operand, loop_v
> > *** 1730,1742 ****
> >       {
> >       case PHI_NODE:
> >         *def = PHI_RESULT (*def_stmt);
> > -       gcc_assert (*dt == vect_induction_def || *dt ==
vect_reduction_def
> > -                   || *dt == vect_invariant_def);
> >         break;
> >
> >       case GIMPLE_MODIFY_STMT:
> >         *def = GIMPLE_STMT_OPERAND (*def_stmt, 0);
> > -       gcc_assert (*dt == vect_loop_def || *dt == vect_invariant_def);
> >         break;
> >
> >       default:
> > --- 1721,1730 ----
>
> I would prefer to keep these asserts, unless there is some trivial
> reason that makes them redundant (that I do not see).  Otherwise OK.
>

The first assert is redundant/duplicate because currently we have phis only
in the loop header, and they can define only reductions/inductions, or
something invariant if it's some weird case that hasn't been cleaned away
for some reason. It is not made redundant by this patch, and there's no
problem in leaving this assert in for now, but when we look at outer-loops
we'll have phis in the loop that aren't loop-header phis (the loop-closed
phis of the inner-loop), and these can define other kinds of computations,
so at that point this assert will be wrong.

The second assert is now wrong, because with this patch we put phis in the
worklist during vect_mark_stmts_to_be_vectorized, so we get to call
vect_is_simple_use on their arguments, where we'd fail on this assert,
cause the argument of a phi-node can be defined by a reduction/induction
stmt (and adding these possibilities to the assert would just make us check
that the def in one of all possible types, which would make it redundant,
and that's why I described it as a "Remove redundant checks", which is not
the most accurate description...)

So I'll leave the first assert in, remove the second assert, and fix the
ChangeLog entry to "Remove a no longer relavant assert"?

thanks,
dorit

> Zdenek

  reply	other threads:[~2007-04-14 18:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-02  8:43 [patch] vectorizer cleanups (and prep for outer-loop vectorization) Dorit Nuzman
2007-04-02  9:48 ` Zdenek Dvorak
2007-04-02  9:55   ` Zdenek Dvorak
2007-04-11 11:51   ` [patch] vectorizer cleanups (and prep for outer-loop vectorization) - part 2/5 Dorit Nuzman
2007-04-11 23:53     ` Zdenek Dvorak
2007-04-14 18:29       ` Dorit Nuzman
2007-04-14 18:56         ` Zdenek Dvorak
2007-04-11 11:51   ` [patch] vectorizer cleanups (and prep for outer-loop vectorization) - part 3/5 Dorit Nuzman
2007-04-12 12:11     ` Zdenek Dvorak
2007-04-14 18:54       ` Dorit Nuzman [this message]
2007-04-14 19:32         ` Zdenek Dvorak
2007-04-11 11:51   ` [patch] vectorizer cleanups (and prep for outer-loop vectorization) - part 4/5 Dorit Nuzman
2007-04-12 12:17     ` Zdenek Dvorak
2007-04-11 11:51   ` [patch] vectorizer cleanups (and prep for outer-loop vectorization) Dorit Nuzman
2007-04-11 11:51   ` [patch] vectorizer cleanups (and prep for outer-loop vectorization) - part 1/5 Dorit Nuzman
2007-04-11 11:51   ` [patch] vectorizer cleanups (and prep for outer-loop vectorization) - part 5/5 Dorit Nuzman
2007-04-12 12:22     ` Zdenek Dvorak
2007-04-12 14:23       ` Daniel Berlin

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=OFD27DDD53.8CA42757-ONC22572BD.0047E4B1-C22572BD.0065BFFC@il.ibm.com \
    --to=dorit@il.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rakdver@atrey.karlin.mff.cuni.cz \
    /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).