This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] PATCH to &&/|| gimplification
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: Jeff Law <law at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: 30 May 2003 10:04:11 -0400
- Subject: Re: [tree-ssa] PATCH to &&/|| gimplification
- Organization: Red Hat Canada
- References: <10305301356.AA20869@vlsi1.ultra.nyu.edu>
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
> 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