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: jh at suse dot cz
- Subject: Re: -freduce-all-givs and fortran
- From: Toon Moene <moene at knmi dot nl>
- Date: Wed, 05 Sep 2001 14:17:47 +0000
- CC: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Organization: Royal Netherlands Meteorological Institute
> 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
then the combination -freduce-all-givs *and* fmove-all-movables is a win
(in number of integer registers used).
Of course, it would be better if loop.c contained code to detect this
itself, but this has turned out to be too hard (i.e. without a rewrite
of the loop optimising code).
Hope this helps,
--
Toon Moene, KNMI, PO Box 201, 3730 AE De Bilt, The Netherlands.
Tel. +31302206443, Fax +31302210407, e-mail moene@knmi.nl
URL: http://www.knmi.nl/hirlam