new unroller vs ppc
Jan Hubicka
jh@suse.cz
Mon Apr 7 16:06:00 GMT 2003
> 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
More information about the Gcc
mailing list