This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: looking for a proof for every optimizier flag (c/c++)


On Monday 03 June 2002 06:07, Joerg Beyer wrote:
> Tim Prince wrote:
> 
> >
> > This will be platform, (somewhat) language, and compiler version
> > dependent.
>
> agreed. I want to measure the effect of compiler and compile time flags
> on a given hardware. This way one build up an argument to switch from an
> older gcc to gcc-3.1. In an environment with a lot of "never touch a
> running system" people this could be helpful.
>

> 	Joerg
Taking a very small part of this picture:
compiler: gcc-3.1.1/g77
platform: P-III/700Mhz mobile
benchmark: Livermore Fortran Kernel single precision 
	(over-all geometric mean result, million "floating point ops"/sec)
common compiler flags: -march=pentium3 -pipe -mfpmath=sse
<-----------varying options ---------->
	-O	-O2 -fno-reduce-all-givs	...+ -fforce-addr -funroll-loops
Mflops	204	213			221	

The optimization "reduce-all-givs" is included in the -O2 package, but seldom 
is beneficial for normal g77 code, so I have disabled it.  Evidently, the 
thinking is different for other languages.   ...+ meaning that the final case 
includes the preceding set of options.  By examining the output summaries of 
individual cases it is possible to see which loops are benefiting from each 
option.  I have the bargain version of SuSE, which has no g77, so I show no 
2.95.3 result.  I have a corrected (from the buggy public source) C source 
version as well; since it becomes a case of showing how a Fortran programmer 
can write Fortran in C, it may not be a fair sample of how the same options 
would do with most C code.
-- 
Tim Prince

Attachment: o77s_tgz
Description: GNU Zip compressed data

Attachment: ll.tgz
Description: GNU Zip compressed data


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