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: Loop optimizer issues


Hello,

> > 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.  

and one more of mine that I have added due to iv analysis :-( I
just cannot cope with other rtl simplifiers that hapily "simplify"
2*3*4*x to (((x << 2) * 3) << 1).
(also I need to do stuff like using distributive law, which definitely
is not what other rtl simplifiers want).

> 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).

yes, this is exactly what I meant.

Zdenek


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