www.delorie.com/gnu/docs/gcc/g77_570.html   search  
Buy the book!

Using and Porting GNU Fortran

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

14.6.4 Use Submodel Options

Using an appropriate `-m' option to generate specific code for your CPU may be worthwhile, though it may mean the executable won't run on other versions of the CPU that don't support the same instruction set. See section `Hardware Models and Configurations' in Using the GNU Compiler Collection (GCC). For instance on an x86 system the compiler might have been built--as shown by `g77 -v'---for the target `i386-pc-linux-gnu', i.e. an `i386' CPU. In that case to generate code best optimized for a Pentium you could use the option `-march=pentium'.

For recent CPUs that don't have explicit support in the released version of gcc, it might still be possible to get improvements with certain `-m' options.

`-fomit-frame-pointer' can help performance on x86 systems and others. It will, however, inhibit debugging on the systems on which it is not turned on anyway by `-O'.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003