This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: -freduce-all-givs and fortran


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]