This is the mail archive of the 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

> >>
> >> Also all of the symbol table is reachable from the global symbol_table
> >> dynamic array which is a GC root.  So instead of walking ->next/previous
> >> and edges you should have a custom marker for the symbol_table global
> >> which does more efficient marking with loops.
> >
> > Indeed, good point!
> > All of the pointers linking symbol table together (i.e. pointer to other symbol
> > table entries) can be ignored for PCH mark (since we are explicitely allocated,
> > and all we need is to mark the trees/lto data and other stuff we point to.
> >
> > These are annotated primarily to get PCH working, where we obviously need
> > to keep them.
> >
> > It would be nice to progress on this patch soon :)
> Oh, and with a custom marker for the symbol_table GC root the actual
> symbol / edge objects need not be GC allocated at all!  Just make sure
> to properly mark the GC objects they refer to.

Lets play with this incrementally; first nodes are streamed to PCH, so we need
to get them out of that mess first.  Second even edges reffers to trees that needs
to be walked. There will be some surprises.

My previous comment about not walking all node pointers was wrong; we do maintain
list of removed cgraph nodes linked by ->next and not referred from any global
array (or rather hash).
So I guess in first iteration we can go with marker that marks all non-symtabs
and walks the ->next linked chains.

> Richard.
> > Honza
> >>
> >> Richard.

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