This is the mail archive of the 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: [tree-ssa] PATCH to &&/|| gimplification

On Fri, 2003-05-30 at 09:56, Richard Kenner wrote:
>     Well, the mental model
>     Richard and I hashed through a while back was that we'd do most loop
>     optimizations at the tree level, but that we'd need a simplified loop
>     optimizer to run on RTL as well.  Once we lower to RTL there's going
>     to be some stuff exposed for LICM and possibly some strength
>     reductions.
> I don't follow.  Most strength reduction opportunities are in addressing
> calculations and those you don't see until RTL.
We may be exposing some address calculations earlier than RTL.  The
exact road to loops is still not completely clear.  There are some
things that are easier done on current GIMPLE trees (unswitching,
interchange, some blocking for memory, parallelization maybe).  

We have talked on and off about lowering GIMPLE into a representation
that exposes address arithmetic which would expose more opportunities
for PRE to remove redundancies from the loop body.

We will always need some amount of duplication in both GIMPLE and RTL
wrt loops.  There are things that must be done at both levels.  For
instance, unrolling may not be a good idea to do at a such high-level. 
OTOH, vectorization of loops needs both high and low level information. 
You first start at the GIMPLE level determining if a loop could be
vectorized and somehow interact with the backend to determine how big
the vector units are, how to block the iteration space and then let the
back end emit the vector instructions.

There'll be a lot of this kind of interaction.  Right now I think we
should start exploring and finding out what the other compilers do in
this area.


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