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: What to remove after tree-ssa is merged?


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.


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