gfortran: the good news and the good news

Tim Prince n8tm@aol.com
Thu Nov 5 22:15:00 GMT 2009


Hans Horn wrote:

> These are the optimization flags I used for fortran (basically carried 
> over from g77):
> 
> -O3
> -fno-strict-aliasing
> -Winline
> -fexpensive-optimizations
> -finline-functions
> -finline-limit=100000
> -fstrength-reduce
> -fgcse
> -fgcse-lm
> -fgcse-sm
> -funroll-loops
> -fforce-addr
> -fomit-frame-pointer
> -malign-double
> 
> Are there any I should NOT be using?
> Did I omit any important one?
Depending on your CPU model and application, -funroll-loops may have 
become excessively aggressive.  For Core i7, I limit unrolling to 4, as 
well as avoiding flags whose effect I'm not sure of.
-fno-strict-aliasing tells the compiler not to assume that your code is 
standard compliant as to overlapping function arguments.



More information about the Fortran mailing list