Graphite and Loop fusion.

Toon Moene toon@moene.org
Mon Nov 30 21:15:00 GMT 2009


Sebastian,

I saw you updated the Graphite Wiki page, and I wondered if there are 
any concrete plans on loop fusion.

The reason I ask is because in Fortran (as of Fortran 90) one often sees 
assignments like:

REAL, ALLOCATABLE ::  A(:,:), B(:,:), C(:,:), D(:,:), E(:,:), F(:,:)

! ... READ IN EXTEND OF ARRAYS ...

READ*,N

! ... ALLOCATE ARRAYS

ALLOCATE(A(N,N),B(N,N),C(N,N),D(N,N),E(N,N),F(N,N))

! ... READ IN ARRAYS

READ*,A,B

C = A + B
D = A * C
E = B * EXP(D)
F = C * LOG(E)

where the four assignments all have the structure of loops like:

DO I = 1, N
    DO J = 1, N
       X(J,I) = OP(A(J,I), B(J,I))
    ENDDO
ENDDO

Obviously, this could benefit from loop fusion, by combining the four 
assignments in one loop.

Is that on the horizon ?

Thanks in advance,

-- 
Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.org/~toon/
Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.5/changes.html



More information about the Gcc mailing list