This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Loop optimizer issues
- From: Pop Sébastian <pop at gauvain dot u-strasbg dot fr>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: Diego Novillo <dnovillo at redhat dot com>,"gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>,Richard Henderson <rth at redhat dot com>,Jason Merrill <jason at redhat dot com>, Jan Hubicka <jh at suse dot cz>,Daniel Berlin <dberlin at dberlin dot org>
- Date: Tue, 3 Jun 2003 10:38:35 +0200
- Subject: Re: Loop optimizer issues
- References: <20030530183552.GA27110@atrey.karlin.mff.cuni.cz> <1054585449.9789.146.camel@frodo.toronto.redhat.com> <20030603075956.GB11555@atrey.karlin.mff.cuni.cz>
On Tue, Jun 03, 2003 at 09:59:56AM +0200, Zdenek Dvorak wrote:
>
> It should be possible to get unswitching/peeling/unrolling from the
> rtl-level easily. I will do this.
>
Ok.
> It would be nice (although I guess somewhat complicated) to get
> common interface for both rtl and ast level induction variable
> analysis.
I have thought a lot at this question... but there is no obvious solution.
> 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).
>
The fold function can be used for simplifying these expressions.
However as Zack has pointed out in his paper there are 4 fold functions:
3 at rtl level, and one fold at tree level.
Maybe the solution is to have just 2 high level folders, one for each IR,
that call a common algebraic folder independent of the IR.
Then we should decide what representation to use for the IVs, and use the
appropriate folder for simplifying the IV expressions.
(in fact all we need is to represent integer constants, and symbolically
handle either integer variables or registers).