This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Language-independent functions-as-trees representation


Op zo 21-07-2002, om 19:01 schreef Richard Henderson:
> On Sun, Jul 21, 2002 at 10:32:03AM +0200, Steven Bosscher wrote:
> > Because at that point:
> > - we have already created the temporary arrays and the code to copy 
> >   in/out the array
> > - we have already scalarized nonzero rank assignments
> > 
> > SIMPLE doesn't know about array syntax, and Fortran 95 does, remember?
> 
> I don't necessarily think this must be a hard and fast rule.
> Are there instances (aside from inlining) that could take
> advantage of optimiziation before scalarization?

Well, of course there are cases where you'd like to optimize before you
scalarize. Basically, any optimization that removes duplicate code from
the scalarized version of the program. But the optimizations I'm
thinking of here are Fortran specific, e.g. PRE, but for complete array
expressions.

> I've suggested before that it may well be useful to have cases
> in which language-specific nodes may survive into SIMPLE.  We'd
> treat them as black boxes during optimization and call back
> into the front end to lower them.

I think that we can represent most Fortran statements and expressions in
SIMPLE, just not array syntax.

The kind of optimizations you would do on SIMPLE trees usually touch
expressions. So if you would do SIMPLE simplifications before
scalarizing, and you would treat array syntax as a black box, I don't
think you'd be doing any optimizations that couldn't be done after the
whole program is SIMPLEfied.

Greetz
Steven





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