This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] tree level if-conversion for vectorizer
- From: Ayal Zaks <ZAKS at il dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Diego Novillo <dnovillo at redhat dot com>, Dorit Naishlos <DORIT at il dot ibm dot com>, Devang Patel <dpatel at apple dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 1 Sep 2004 11:04:00 +0300
- Subject: Re: [PATCH] tree level if-conversion for vectorizer
Richard Henderson <rth@redhat.com> wrote on 31/08/2004 09:36:08:
> On Mon, Aug 30, 2004 at 10:40:16PM -0700, Devang Patel wrote:
> > OK. But as you say, how to handle PARM_DECL ?
>
> T3 = P ? T2 : T1.
>
> In the case of PARM_DECL, T1 as the default definition *does* have
> a defined meaning -- the value of the parameter as given by the caller.
>
> > if (COND)
> > A[i] = x;
> >
> > do you think, we should introduce temp. here, like
> >
> > t = A[i];
> > if (COND)
> > t = x;
> > A[i] = t;
>
> For a conditional store, you must either do this or fail the transform.
> There are no other alternatives.
There may be another alternative for conditional stores. If the compiler
has some scratch-pad address, into which it can always store without
causing any trouble, we could do
t = (COND ? &A[i] : scratch-pad-address)
*t = x
which also applies to conditional loads.
Ayal.