This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: new unroller vs ppc
- From: Jan Hubicka <jh at suse dot cz>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: David Edelsohn <dje at watson dot ibm dot com>,Dale Johannesen <dalej at apple dot com>, gcc at gcc dot gnu dot org, jh at suse dot cz,rth at redhat dot com
- Date: Mon, 7 Apr 2003 14:30:37 +0200
- Subject: Re: new unroller vs ppc
- References: <20030321075050.GA25664@atrey.karlin.mff.cuni.cz> <200303290116.UAA24820@makai.watson.ibm.com> <20030406223938.GA5677@atrey.karlin.mff.cuni.cz>
> Hello,
>
> > Zdenek> Does this patch:
> > Zdenek> http://gcc.gnu.org/ml/gcc-patches/2003-03/msg01564.html
> > Zdenek> help?
> >
> > No, not really:
> [snip]
>
> looking at the assembler that comes out of crosscompiler, I see two
> problems:
>
> 1) we do not do induction variable splitting; the webizer pass
> http://gcc.gnu.org/ml/gcc-patches/2003-02/msg00501.html
> should take care of this
This patch appears to have problems to get in, however I hope it will
one day. Or is there something particulary wrong about it?
> 2) this code in cse.c
>
> /* Don't associate these operations if they are a PLUS with the
> same constant and it is a power of two. These might be doable
> with a pre- or post-increment. Similarly for two subtracts of
> identical powers of two with post decrement. */
>
> if (code == PLUS && INTVAL (const_arg1) == INTVAL (inner_const)
> && ((HAVE_PRE_INCREMENT
> && exact_log2 (INTVAL (const_arg1)) >= 0)
> || (HAVE_POST_INCREMENT
> && exact_log2 (INTVAL (const_arg1)) >= 0)
> || (HAVE_PRE_DECREMENT
> && exact_log2 (- INTVAL (const_arg1)) >= 0)
> || (HAVE_POST_DECREMENT
> && exact_log2 (- INTVAL (const_arg1)) >= 0)))
> break;
>
> prevents us from combining the increments of induction variables even
> with webizer. I think the correct solution is to split
> pre/post modify transformation out of flow.c (relatively easy,
> I have the patch somewhere), to run it before cse and to cancel this
> code.
You won't be able to cancel it completely I guess, only for CSE2 pass.
The passes before flow don't expect autoincrements to happen.
Otherwise this sounds like sane plan to me.
Honza
>
> Zdenek