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 1/2] Convert symtab, cgraph and varpool nodes into a real class hierarchy


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

On the up-side: This would allow explicitly-tracked objects to be
moved back out of GGC-space. Can't wait to put the CFG object back in
pools! :-) And I guess symtab objects are also explicitly tracked and
therefore candidates for a more cache-friendly allocation strategy...

Ciao!
Steven


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