This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Support for V2 plugin API
> On Mon, Oct 3, 2011 at 9:52 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> >> This caused:
> >>
> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50601
> > Hi,
> > do you use linker with V2 API?
> >
>
> No.
Hi,
the problem is that partitioning algorithm forgets about the aliase and don't put it into any partition.
I am surprised this is not causing problems elsewhere. This patch should fix it, but I would like to give
it a try on firefox that is not currently in buildable shape. Will try tomorrow.
Honza
Index: lto.c
===================================================================
--- lto.c (revision 179627)
+++ lto.c (working copy)
@@ -1400,6 +1400,14 @@ add_references_to_partition (ltrans_part
&& !varpool_node_in_set_p (ipa_ref_varpool_node (ref), part->varpool_set))
add_varpool_node_to_partition (part, ipa_ref_varpool_node (ref));
}
+ for (i = 0; ipa_ref_list_refering_iterate (refs, i, ref); i++)
+ if (ref->use == IPA_REF_ALIAS)
+ {
+ if (ref->refering_type == IPA_REF_CGRAPH)
+ add_cgraph_node_to_partition (part, ipa_ref_refering_node (ref));
+ else
+ add_varpool_node_to_partition (part, ipa_ref_refering_varpool_node (ref));
+ }
}
/* Worker for add_cgraph_node_to_partition. */