This is the mail archive of the gcc-patches@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: Patch to allow Ada to work with tree-ssa



On Jun 22, 2004, at 4:28 PM, Richard Kenner wrote:


Since Richard Henderson and Zack seem to think it's best, why don't you
just create new tree nodes for these variable-length cases? That seems
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 perspective.

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.

--Dan


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