This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/2] Convert symtab, cgraph and varpool nodes into a real class hierarchy
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Steven Bosscher <stevenb dot gcc at gmail dot com>, David Malcolm <dmalcolm at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 20 Aug 2013 23:34:18 +0200
- Subject: Re: [PATCH 1/2] Convert symtab, cgraph and varpool nodes into a real class hierarchy
- References: <1376614672-8927-1-git-send-email-dmalcolm at redhat dot com> <1376614672-8927-2-git-send-email-dmalcolm at redhat dot com> <20130820210623 dot GD16244 at atrey dot karlin dot mff dot cuni dot cz> <CABu31nMo7xUCSREF=gSmp7nbcnmaWkSyFtj8YKW4KixBNRwcaA at mail dot gmail dot com> <20130820213132 dot GA22112 at kam dot mff dot cuni dot cz>
> > On Tue, Aug 20, 2013 at 11:06 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > >> +/* GTY((user)) hooks for symtab_node_base (and its subclasses).
> > >> + We could use virtual functions for this, but given the presence of the
> > >> + "type" field and the trivial size of the class hierarchy, switches are
> > >> + perhaps simpler and faster. */
> > >
> > > Generally I am not really happy about the hand marking - why can't GTY just handle
> > > it by itself? Do we have some eisting exmaple of this?
> > >
> > > GTY was in a way of getting proper class hiearchy for quite a while and this is
> > > probably less ugly than C-syntax-classes we have now. But it would be nice to
> > > have some longer term plan what to do here. Obviously this is going to make
> > > any changes to GGC implementation close to imposible since all the
> > > implementation details are exposed now.
> >
> > As far as I understand, the intent is to move to user markers, see:
> > http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00630.html
>
> OK, I have nothing against explicit user markers. It however seem to need a bit
> of abstraction - just writting by hand whatever gengtype produces seems ugly.
However reading through the thread, I guess we do have agreement on going with user
markers, so I do not think it is a reason to hold the patch.
Honza