A prototype loop reverser for the scalarizer

Daniel Berlin dberlin@dberlin.org
Sun Oct 8 17:00:00 GMT 2006


On 10/8/06, Paul Thomas <paulthomas2@wanadoo.fr> wrote:
> Steven and Daniel Berlin,
>
> Thanks for the replies:
>
> I fold everything except the negate_expression - I'll make it so...
>
> >> On Sunday 08 October 2006 13:31, Paul Thomas wrote:
> >> > I do not seem able to make |ftree-loop-linear do loop revresal for me.
> >> > Should this not effect the same transformation, or have I
> >> misunderstood
> >> > something?
> >>
> >> IRIC, loop reversal is not yet implemented in the framework of
> >> -ftree-loop-linear optimizations.  Dan Berlin knows more about that,
> >> I suppose.
> >>
> >
> > It is implemented, in terms of "if you tell it to reverse a loop, it
> > will". None of the heuristics tell it to reverse a loop right now,
> > however. :)
>
> OK - I was looking at loop swapping in the scalarizer, to minimise
> temporary size, too.  Paul and Steven had left one patch of code #if
> zeroed out that should do this.  Beyond that, I was sketching out some
> ideas for some rudimentary loop optimization in ordinary, run-of
> -the-mill fortran do loops.

Such as?

>  Is this worth contemplating, or will the
> gcc infrastructure be in place on a shortish time scale?

All you need to do to tree-loop-linear to tell it to transform the
loop (skew, scale, reverse, or interchange), is come up with the
approriate transformation matrix, and it will do it.

Really, you shouldn't be reimplementing these loop transforms at
another level, you should improve the existing infrastructure so it
has the heuristics to do what you want.

Sebastian and his advisor are working on general polyhedral
transforms, which would enable per-statement transforms of the loop
space.

Zdenek had a patch to do reversal using the infrastructure.

>
> Regards
>
> Paul
>
>
>



More information about the Fortran mailing list