Loop optimizer issues
Zdenek Dvorak
rakdver@atrey.karlin.mff.cuni.cz
Tue Jun 3 08:38:00 GMT 2003
Hello,
> > The process of merging of the loop optimizer work I am currently doing
> > on rtlopt branch. I am quite sure that I won't be able to get it to
> > reasonable state for 3.4. I would however like to reuse some parts of
> > this work on tree-ssa. Would it be feasible to merge this work from
> > rtlopt branch to tree-ssa branch once it is in sufficiently stabilized
> > state (in about a month or so)?
> >
> I think that's a good idea. However, I would try to avoid introducing
> too many instabilities to the branch. Can the code be disabled by
> default?
yes (although of course I would not attempt to merge the branch until it
gets some serious testing).
> > What parts do we want to do on ast level and what on rtl level?
> > The optimizations I would like to see on rtl level:
> >
> Hard to say without some experimentation. Dan has volunteered to
> compare several compilers that he's familiar with. That looks like a
> reasonable starting point.
Fine.
> > And finally, who will do it? I of course volunteer for anything of the
> >
> Agreed. I had thought of doing infrastructure bits like induction
> variable detection and what-not. Other than that I think that we could
> take ideas from what other compilers do and let people start
> implementing whatever tickles their fancy.
>
> To avoid duplicate effort, let's just raise our hand whenever we are
> going to get started with something. The initial list that I had in
> mind (at the tree level) includes:
>
> Induction variable detection
> Array dependency information
> Unswitching
> Peeling
> Interchange
> Fusion
> Fission
>
> I volunteer to collect suggestions and keep them in the TODO section of
> the project page together with whoever is working on it. If there are
> two proposals for the same analysis/optimization but with different
> approaches, we may want to implement both and then decide which one we
> like best.
It should be possible to get unswitching/peeling/unrolling from the
rtl-level easily. I will do this.
It would be nice (although I guess somewhat complicated) to get
common interface for both rtl and ast level induction variable
analysis. It should then be possible to share for example the
code to determine number of iterations of loop -- all what it requieres
is to have some basic means to manipulate symbolic expressions
both on rtl and trees + some expression simplification function
(which is needed anyway).
Zdenek
> Since we are just getting started, having a strict separation of tasks
> doesn't strike as the best approach. Unless someone has direct
> experience with implementing loop optimizers at two levels of IL, I
> think we should just get started with the seemingly obvious things.
>
> We will run into various infrastructure limitations. So, let's just get
> started with something and figure things out as we run into walls.
More information about the Gcc
mailing list