> 2015-04-03 20:12 GMT+03:00 Jan Hubicka <hubi...@ucw.cz>:
> >>
> >> Currently ipa_comdats doesn't set comdat groups for thunks. At the
> >
> > I see, that is a bug.  It is supposed to keep thunks in the same section
> > as their target (thunks doesn't really work across sections on some target,
> > like PPC, because there is no way to produce a tailcall)
> > Does the following fix the problem?
> 
> I believe this should help.  Will try it.
If it passes testing, the patch is preapproved.

Thanks!
Honza
> 
> Thanks,
> Ilya
> 
> > Index: ipa-comdats.c
> > ===================================================================
> > --- ipa-comdats.c       (revision 221857)
> > +++ ipa-comdats.c       (working copy)
> > @@ -377,12 +377,12 @@
> >               fprintf (dump_file, "To group: %s\n", IDENTIFIER_POINTER 
> > (group));
> >             }
> >           if (is_a <cgraph_node *> (symbol))
> > -          dyn_cast <cgraph_node *>(symbol)->call_for_symbol_and_aliases
> > +          dyn_cast <cgraph_node 
> > *>(symbol)->call_for_symbol_thunks_and_aliases
> >                   (set_comdat_group_1,
> >                    *comdat_head_map.get (group),
> >                    true);
> >           else
> > -          symbol->call_for_symbol_and_aliases
> > +          symbol->call_for_symbol_thunks_and_aliases
> >                   (set_comdat_group,
> >                    *comdat_head_map.get (group),
> >                    true);
> >

Reply via email to