[Patch, libgfortran] PR21468 Vectorizing matmul, other perf improvements

Thomas Koenig Thomas.Koenig@online.de
Sun Nov 13 19:50:00 GMT 2005


On Sun, Nov 13, 2005 at 05:52:37PM +0200, Janne Blomqvist wrote:

> I have looked at PR21468, "Vectorizing libgfortran". The attached
> patch enables vectorizing the main loop for matmul in case of unit
> stride. It doesn't change the code much, only adds const and restrict
> appropriately to the type declarations, so that the vectorizer can
> safely vectorize the main loop. 

This is OK.  You can commit this part.

> Another thing that it does is enabling -funroll-loops for matmul_* and
> matmull_*. This is actually a bigger performance booster than
> vectorizing, almost doubling performance.

I fear that this may be platform-dependant.  Loop unrolling may
be a big win for architectures with many registers, while on
architectures with few registers, such as i686, it may cause
performance degradation.

Maybe this needs to become platform-dependent.  I think we need
some more benchmarks here.

	Thomas



More information about the Fortran mailing list