This is the mail archive of the
mailing list for the GCC project.
Re: Patch to allow Ada to work with tree-ssa
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: gcc-patches at gcc dot gnu dot org,mark at codesourcery dot com
- Date: Tue, 22 Jun 2004 17:05:30 -0400
- Subject: Re: Patch to allow Ada to work with tree-ssa
- References: <10406222028.AA10260@vlsi1.ultra.nyu.edu>
On Jun 22, 2004, at 4:28 PM, Richard Kenner wrote:
Since Richard Henderson and Zack seem to think it's best, why
just create new tree nodes for these variable-length cases? That
to be the consensus point of view on how to solve the problem.
Except that the authors of the optimizers haven't weighed in here yet
and they were very much against adding new nodes to GIMPLE, which is
what this would be doing. Having played with some of that code, I can
tell you that it won't be pleasant to add all the extra cases to
deal with the additional nodes.
As a part who writes optimizers, as a general principle, i'm very
against adding nodes to GIMPLE.
However, if it's a node that is just a variable sized analogue of a
node that already exists in the grammar, and retains the same basic
grammar as the old node, it's not that a big a deal.
IE if you allow VARIABLE_ARRAY_REF (or whatever) *only* where you
currently allow array_ref, it's not that big a deal from an optimizer
It's when you start making significant actual grammar changes that make
GIMPLE much more complex, that the optimizers run into problems.
The most painful changes in the optimizers and other walkers i've had
to deal with were when we started allowing things like ADDR_EXPR's in
call arguments (at one point that wasn't allowed), when we started
allowing INDIRECT_REFS on both sides of the same expression (at one
point that wasn't allowed), etc.
In other words, things that significantly modified the shape of
expressions you would see.
Having a VARIABLE_ARRAY_REF (or whatever it was, i keep forgetting)
exactly where you allow array_ref, doesn't change the shape of
expressions you see much, if at all.