This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: What to remove after tree-ssa is merged?
- From: Paul Brook <paul at codesourcery dot com>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner), matz at suse dot de
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 4 Feb 2004 18:39:49 +0000
- Subject: Re: What to remove after tree-ssa is merged?
- Organization: CodeSourcery
- References: <10402041757.AA02044@vlsi1.ultra.nyu.edu>
On Wednesday 04 February 2004 5:57 pm, Richard Kenner wrote:
> Sure, all expressions involving any P_E recursively would have to be
> expanded in the frontend, including such expressions (probably by
> using temporaries in order not to have to lower the whole tree). If
> that's feasible I don't know.
>
> You won't need temporaries within statements and it can't be done at all
> for the expressions within types.
It seems to me that the basic problem is thet there are expressions implicit
in the typing system, and two solutions to this:
(a) Lower these in the frontend/gimplifier and make all the implicit
expressions explicit. This is what is done for C99 VLAs.
(b) Teach the optimizers about these implicit expressions.
Neither of these seems particularly easy to my unexperienced eye.
On mainline we effectively have a bit of both. ie. constant folding does (b)
and then it gets expanded to RTL, which does (a).
There doesn't seem to be any consensus on which of these is easiest/best for
tree-ssa.
Is there any point continuing this thread given we don't have an
implementation of either, and no frontend(s) to test them with.
Paul
N.B. By "implicit expression" I mean an expression which depends on a variable
not mentioned directly.
e.g. in previously mentioned examples a COMPONENT_REF where the actual offset
depends on the size of an array which depends on the value of a variable.