This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g77 performance on ALPHA
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: g77 performance on ALPHA
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Sat, 28 Aug 1999 21:25:21 +0200
- CC: martin dot kahlert at provi dot de, egcs at egcs dot cygnus dot com
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <199908281130.NAA00385@keksy.linux.provi.de> <19990828114410.A29542@cygnus.com>
Richard Henderson wrote:
> On Sat, Aug 28, 1999 at 01:30:48PM +0200, martin.kahlert@provi.de wrote:
> > So i tested with a small daxpy operation:
> > SUBROUTINE DAXPY(N,ALPHA,X,I1,Y,I2)
> > IMPLICIT NONE
> > INTEGER*4 N,I,I1,I2
> > REAL*8 ALPHA,X(N),Y(N)
> >
> > DO I=1, N
> > Y(I)=Y(I)+ALPHA*X(I)
> > ENDDO
> > RETURN
> > END
> [...]
> > The loop isn't unrolled with -funroll-loops, either.
>
> Nope. We don't know how to efficiently unroll loops with
> non-constant bounds. We don't try unless forced ...
Huh? Then there must be something pretty wrong with the alpha port -
this is the inner loop I get with g77 -O3 -funroll-loops, using
gcc-2.95.1 on Linux/Intel:
.L6:
fld %st(0)
fmull (%edx)
faddl (%eax)
fstpl (%eax)
fld %st(0)
fmull 8(%edx)
faddl 8(%eax)
fstpl 8(%eax)
fld %st(0)
fmull 16(%edx)
faddl 16(%eax)
fstpl 16(%eax)
fld %st(0)
fmull 24(%edx)
faddl 24(%eax)
addl $32,%edx
fstpl 24(%eax)
addl $32,%eax
addl $-4,%ebx
jns .L6
Looks cleanly unrolled four times, to me.
What's up, Doc ?
--
Toon Moene (toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
GNU Fortran: http://world.std.com/~burley/g77.html