We're out of tree codes; now what?
Daniel Berlin
dberlin@dberlin.org
Mon Mar 12 21:24:00 GMT 2007
On 3/12/07, Andrew Pinski <pinskia@gmail.com> wrote:
> On 3/12/07, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> > On 3/12/07, Andrew Pinski <pinskia@gmail.com> wrote:
> > > Can I recommend something just crazy, rewrite the C and C++ front-ends
> > > so they don't use the tree structure at all except when lowering until
> > > gimple like the rest of the GCC front-ends?
> >
> > The C front end already emits generic, so there's almost no win in
> > rewriting it (one lame tree code in c-common.def -- not worth the
> > effort ;-).
>
> I was thinking to rewrite the C++ front-end not to use extra tree
> codes you would also need to rewrite the C front-end but now thinking
> about, you could use one tree code for all of C++ and then use
> subcodes or at least one tree code for types, one for expressions, one
> for decls and one for all others and then use subcodes.
This was part of the point of making decl nodes a hierarchy, to enable
exactly this (even though it has not been split into subcodes yet)
tree_contains_struct then allows you to exactly check things are still
safe to access.
More information about the Gcc
mailing list