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 4/4] Data structure is used for inline_summary struct.


On Fri, Nov 14, 2014 at 08:59:10PM +0100, Jan Hubicka wrote:
> > > 
> > > > b) with GTY, we cannot call destructor
> > > 
> > > Everything in symbol table is expecitely memory managed (i.e. enver left
> > > to be freed by garbage collector). It resists in GTY only to allow linking
> > > garbage collected object from them and to get PCH working.
> > > 
> > 
> > Well, if I understand the intent correctly, summaries are for stuff
> > that is not in the symbol table.  For example jump functions are a
> Correct.
> > vector of structures possibly containing trees, so everything has to
> > be in garbage collected memory.
> > 
> > When an edge is removed, it is necessary to be notified about it
> > immediately, for example to decrement rdesc_refcount (you might argue
> > that that should be done in a separate hook and not from within a
> > summary class but then you start to rely on hook invocation ordering
> > so I think it is better to eventually use the summaries for it too).
> 
> I do not see why ctors/dtors can not do the reference counting. In fact
> this is how refcounting is done usually anyway?
> 

Well, when there is no garbage collection involved then yes, that is
how you normally do it but in the GC case, there is the question of
what is the appropriate time to call destructor on garbage collected
data (like jump functions)?

Martin


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