This is the mail archive of the
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: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, David Malcolm <dmalcolm at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 27 Aug 2013 14:45:01 +0200
- Subject: Re: [PATCH 1/2] Convert symtab, cgraph and varpool nodes into a real class hierarchy
- Authentication-results: sourceware.org; auth=none
- References: <1376614672-8927-1-git-send-email-dmalcolm at redhat dot com> <1376614672-8927-2-git-send-email-dmalcolm at redhat dot com> <CAFiYyc3_s7GaBQdgObG2A2TYKdCj==2xAJ80+ufhVcT5k48KTg at mail dot gmail dot com> <20130827114050 dot GA6634 at kam dot mff dot cuni dot cz> <CAFiYyc29Ou7pLymDEDmpohJChM3G0mV9AqowbuNy20QhyYzoLA at mail dot gmail dot com>
> >> 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.
> > Honza
> >> Richard.