This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Translation of multidimensional arrays
- From: Paul Thomas <paulthomas2 at wanadoo dot fr>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: fortran at gcc dot gnu dot org
- Date: Mon, 15 May 2006 23:24:47 +0200
- Subject: Re: Translation of multidimensional arrays
- References: <20060515175331.GA4746@atrey.karlin.mff.cuni.cz>
Zdenek,
gfortran currently flattens accesses to multidimensional arrays, i.e., a(i,j,k)
becomes a[offset + i * stride[0] + j * stride[1] + k * stride[2]]. This
leads to efficient low-level code, however, it also makes some
optimizations more difficult (for example, we lose some information for
dependency analysis). I would like to change this (to get the above
translated to a[i][j][k]).
gfortran already does a lot of dependency analysis in the frontend. What
extra analysis will we get?
So I think doing this transition should be fairly straightforward,
although of course time consuming. I would like to know whether someone
is not already working on something similar, so that I do not waste my
time in such a case. Also, I would like to hear if there are some
objections to this idea.
I do not have an objection but have heard nothing yet to convince me
that this will gain us anything. Could you elaborate, please?
Best regards
Paul Thomas