This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] Avoid induction variables in DO loops.


Daniel Berlin <dberlin@dberlin.org>:

> On Thu, 2004-10-07 at 08:29 +0800, Canqun Yang wrote:
> > Daniel Berlin <dberlin@dberlin.org>:
> >
> > > >
> > > > Hopefully it should be sufficient to enable the
> > SPEC loop interchange,
> > > > though
> > > > I haven't checked.
> > >
> > > I'll check.
> > > We still need sebastian's data dependence patch
> > approved for mainline
> > > before it would happen there, but i have a 
mainline
> > tree with the patch
> > > in it handy :P.
> > >
> > >
> > Gfortran frontend converts multi-dimensional array
> > reference to one-dimensional array reference.
> > According to my test with LNO branch, GCC's data
> > dependence analysis for nested loops (defined in 
tree-
> > data-ref.c) can not work for such array references.
>
> What?
> What makes you think that it can't work?
> We perform interchange, etc, of lowered dimension 
arrays just fine.

Just by my test.

> > Can sebastian's patch resolve this problem?
>
> Sebastian's patch is already applied to LNO, so if 
it doesn't work
> there, it won't work on mainline.
>
Oh, I've got a mistake. The test taken by me recently 
is for mainline, not LNO branch. 

My newest test shows that LNO branch can do data 
dependence analysis for arrays with known bounds, but  
not unknown bounds. Below is an Fortran example.

subroutine array_ref (a, b, c, N)
   real a(N, N), b(N, N), c(N, N)
   do i = 1, N
     do j = 1, N
       c(j, i) = a(j, i) * b(j, i)
     enddo
   enddo
end



Canqun Yang
Creative Compiler Research Group.
National University of Defense Technology, China.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]