On Friday 28 October 2011 15:56:36 Jack Howarth wrote: > Mikael, > The complete patch bootstraps current FSF gcc trunk on > x86_64-apple-darwin11 and the resulting gfortran compiler can compile the > Polyhedron 2005 benchmarks using... > > Compile Command : gfortran-fsf-4.7 -O3 -ffast-math -funroll-loops -flto > -fwhole-program %n.f90 -o %n > > without runtime regressions. However I don't seem to see any particular > performance improvements with your patches applied. In fact, a few > benchmarks including nf and test_fpu seem to show slower runtimes > (~8-11%). Have you done any benchmarking with and without the proposed > patches? Jack Not myself, but the previous versions of the patch have been reported to give sensitive improvement on "tonto" here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43829#c26 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43829#c35 Since those versions, the array constructor handling has been improved, and a few mostly cosmetic changes have been applied, so I expect the posted patch to be on par with the previous ones, possibly slightly better. Now regarding your regressions, it is quite a lot worse, and quite unexpected. I have just looked at test_fpu.f90 and nf.f90 from a polyhedron source I have found at http://www.polyhedron.com/web_images/documents/pb05.zip. There is no call to product in them, and both use only single-argument sum calls, which are not (or shouldn't be) impacted by my patch (scalar cases). Indeed, if I compare the code produced using -fdump-tree-original, there is zero difference in nf.f90, and in test_fpu.f90 only slight variations which are very very unlikely to cause the regression you see (see attached diff). Could you double check your figures, and/or that the regressions are really caused by my patch? Mikael