Fortran array format [Was: Scalar Replacement]

Paul Brook paul@codesourcery.com
Wed Sep 22 16:17:00 GMT 2004


On Wednesday 22 September 2004 16:03, Canqun Yang wrote:
> By now, the problem I encountered is the
> representation for array references of Fortran 95. As
> Gnu Fortran 95 frontend converts multi-dimensions
> arrays to one-dimension array references, it is hard
> to recover the number of dimensions and the index of
> each dimension for array references. This makes the
> dependence relation analysis failed to perform on tree
> loops.
>
> Is there any way to recover those information without
> modifying the Fortran 95 frontend?

This sounds like what the linear loop transform and scalar evolutions stuff is 
doing.

> Or, if not. How to modify the frontend to satisify
> this?

The fortran frontend should be changed to use the [relatively] new 
multiple-argument form of ARRAY_REF.

However before that happens we should check with the tree-ssa and loop 
optimization people that the current ARRAY_REF format does provide the 
necessary information in an efficient and convenient form.

This was discussed a bit at the last GCC summit, although I don't think we 
reached any conclusions. Basically it would be nice to have some way of 
communicating fortran array structure to the optimizers. However I don't 
think anyone's figured out how best to do this, or how it would fit in with 
out existing optimization framework.

Paul



More information about the Gcc mailing list