On Mon, Apr 9, 2012 at 12:18 PM, Jan Hubicka <hubi...@ucw.cz> wrote:
> Hi,
> this patch fixes several different ICEs related to handling aliases in WHOPR
> partitioning.  It took me over week debug this, but when variable alias
> is added to a boundary and its destination is not added, we get queue of
> unforutnate events where the destinatoin gets analyzed and added at ltrans 
> time
> resulting in interesting miscompilation seen at Mozilla with some vtables.
> The problem is that constructor won't get streamed when the declaration is
> not in varpool at partitioning time and thus once the variable is re-added
> it has zero constructor.
> Of course the problem manifests itself in various weird ways depending
> on ordering of linker command maing it very difficult to reduce anything.
>
> While working on this I also noticed that PR 52634 is about related problem
> where aliases are incorectly partitioned into multiple partitions.
> The patch also fixes the varpool ICEs mentioned in the other two PRs.
> I failed to produce testcase version of PR52722 testcase, since it does not
> link now either, but it won't ICE.
>
> I will commit the patch and wait for some time, but I would like to backport
> it to 4.7, since it solves quite nasty misoptimization problem.
> At mainline after this patch i would like to follow with series of cleanups
> and API changes I have in queue for symtab work.
>
> Honza
>
>        PR lto/52722
>        PR lto/51765
>        PR lto/52634
>        * lto-cgraph.c (compute_ltrans_boundary): When alias is in the 
> boundary,
>        add its target too.
>        * lto.c (add_references_to_partition): Add also aliased nodes.
>        (add_cgraph_node_to_partition,
>        add_varpool_node_to_partition): Work on nodes, not functions/variables;
>        when adding alias, add also the aliased object.
>        * gcc.dg/lto/pr52634_1.c: New testcase.
>        * gcc.dg/lto/pr52634_0.c: New testcase.

Hi Jan,

Can you backport it to 4.7? It also fixes:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53768

Thanks.

-- 
H.J.

Reply via email to