This is the mail archive of the gcc-patches@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: [patch, fortran] PR 40628, front-end optimization pass


Hi Jerry,
> On 07/18/2010 01:46 AM, Daniel Kraft wrote:
> > Hi Thomas,
> >
> > Thomas Koenig wrote:
> >> finally, here's the first attempt at a front-end optimization pass.
> >> Right now, it fixes PR 40626 and optimizes comparisons between variables
> >> (which only really is relevant for character comparisons). Many more
> >> things could (and should) be added over time.
> >
> 
> I like the idea as long as we do not duplicate middle-end work. If we can 
> improve performance without sacrificing maintainability and correctness, I am 
> all for it.  The idea of general passes is good.  Rather than optimize.c maybe 
> call it early_pass.c or whatever.

So, how do we proceed?

I could set up a general pass framework.  This have structs of
containing pointers to functions which handle assignments,
expressions, operators and actual arglists, one for each pass,
and a routine for walking the expressions and invoking the correct
functions.

This would mean one file passes.c (which contains the handle_code and
handle_code_node functions), a passes.h header and a single file (e.g.
pass-optimize.c) for each pass containing the individual functions.

This sounds doable, but will take a bit of time.

Further comments?

Thomas


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