Re: Strange optimisation problem - gcc 4.3.2

2009-11-12 Thread Bernd Roesch
Hello I notice maybe a simular problem.when there is a constant pointer then GCC 4.0 do not inline the func.gcc 3 do. that can see on this old whetstone benchmark.with gcc 3.4.0 run faster. http://www.netlib.org/benchmark/whetstone.c as soon the term double *Z is change to double Z the func

Re: Strange optimisation problem - gcc 4.3.2

2009-11-12 Thread Andrew Haley
Mark Cave-Ayland wrote: So I'm really confused as to how adding a simply function pointer in the global declaration section (without even adding any code to reference it) suddenly incurs an extra 40% overhead? Can anyone explain why this is, and/or point me to any suitable gcc optimisation

Re: Strange optimisation problem - gcc 4.3.2

2009-11-12 Thread Mark Cave-Ayland
Andrew Haley wrote: There are a few possibilities, such as changing the alignment of the data, but without seeing the code it's hard to say. It's just a standard checkout from the OpenBIOS SVN with a patch I can provide to implement the recursive Fibonacci function if someone is happy to

Re: Strange optimisation problem - gcc 4.3.2

2009-11-12 Thread Andrew Haley
Mark Cave-Ayland wrote: Andrew Haley wrote: There are a few possibilities, such as changing the alignment of the data, but without seeing the code it's hard to say. It's just a standard checkout from the OpenBIOS SVN with a patch I can provide to implement the recursive Fibonacci function

Re: Strange optimisation problem - gcc 4.3.2

2009-11-12 Thread Mark Cave-Ayland
Andrew Haley wrote: Within reason that's OK, or you can use pastebin. Done. Patch attached. All you need to do to build is the following: svn co svn://openbios.org/openbios/trunk/openbios-devel cd openbios-devel patch -p0 openbios-fibonacci.patch Then to build on x86: rm -rf obj-x86/;

Strange optimisation problem - gcc 4.3.2

2009-11-11 Thread Mark Cave-Ayland
Hi everyone, I've been looking at adding some code to a performance-critical section of OpenBIOS, and I'm quite confused by how some of the changes I am making are affecting the overall performance. For a benchmark, I am using a recursive fibonacci function to test the effect of any changes