This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: -freduce-all-givs and fortran
- To: Toon Moene <moene at knmi dot nl>
- Subject: Re: -freduce-all-givs and fortran
- From: Jan Hubicka <jh at suse dot cz>
- Date: Wed, 5 Sep 2001 16:28:32 +0200
- Cc: jh at suse dot cz, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- References: <3B96340B.C1747B6D@knmi.nl>
> > the fortran fontend enables by default -freduce-all-gics and
> > -fmove-all-movables. This causes important problem on i386, where
> > reducing all givs brings too many temporary registers causing too
> > many spills.
>
> That depends. Lots of Fortran code is written in a way that would lead
> to a *reduction* in the use of (integer) registers if you apply
> -freduce-all-givs *and* fmove-all-movables.
>
> The examples I have at home, but in general:
>
> 1. If you're dealing with nested loops over multi-rank arrays
>
> and
>
> 2. The arrays are passed as actual arguments to the subroutine
> where the computation take place
Can you please show me simple testcase? It probably makes sense to
reorganize loop optimizer - I am thinking about separating BIV/GIV
discovery code to separate library, as it has more usage than just
strength reducing and loop unrolling and then we can think about
larger changes in this area.
Honza