This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC/RFA] Add reference lists into callgraph/varpool and improve WHOPR partitioning
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org, dnovillo at google dot com, rguenther at suse dot de, mjambor at suse dot cz
- Date: Sun, 2 May 2010 16:38:49 +0200
- Subject: Re: [RFC/RFA] Add reference lists into callgraph/varpool and improve WHOPR partitioning
- References: <20100502133008.GA3726@kam.mff.cuni.cz> <x2x84fc9c001005020718oec7f00e4o4148d8d873eac699@mail.gmail.com>
>
> If we now have an interface that transparently handles varpool nodes
> and cgraph nodes, why not go the way and make them derived from a
> common base? Like
I was considering this option too. But in the end, I don't think it
really makes things much easier here (since all resonable uses of the
references needs to figure out the type of node anyway) and it would
imply more common stuff - the type tag in every cgraph/varpool node,
probably commonized uids etc.
It seems to me that for uses
>
> union ipa_obj {
> ipa_obj_base base;
> cgraph_node node;
> varpool_node vnode;
> };
>
> ipa_obj_base {
> enum ipa_obj_kind kind;
> };
>
> struct cgraph_node {
> ipa_obj_base base;
> ...
> };
>
> struct varpool_node {
> ipa_obj_base base;
> ...
> };
>
> ? That at least would simplify the odd interfaces taking two pairs
> of cgraph/varpool nodes considerably.
>
> Overall I like the idea - thanks for implementing it. But ...
>
> > I will try to send separate patches for those three problems since they can all
> > be fixed independently on rest of changes.
>
> ... they can also be fixed upfront, correct? We already have quite a number
> of regressions due to your previous changes and I'd rather not add to them.
Yes, I plan that. I am just looking into the C++ FE issue and hope for your
suggestions how do you preffer to handle symtab merging. With this we get
pretty close to whopr working as it should - only remaining missing bit is
proper streaming of clones.
Just would like to settle down on actual implementation of references to not
get even larger patch that would need to be redesigned later.
There are two regressions I am aware of (the -O0 whopr that is easy to do
with updating the patch for inform, I will do that now and the fortran issue)
Honza