> On Thu, Oct 15, 2020 at 1:53 PM Jan Hubicka <hubi...@ucw.cz> wrote:
> >
> > Hi,
> > this patch makes binds_to_current_def_p to return true when the current
> > def is in other partition.  This is needed for modref to propagate info
> > on loads across partition boundary.
> 
> Hmm, but partitioning shouldn't influence what a def binds to so this looks
> like a wrong (possibly pessimizing) change?

If you have symbol in ohter partition you get
  definition == false
  in_other_partition == true
So previously we returned false at the first check, now we proceed
testing if the definition binds locally from the visibility and
resolution info (eventually looking for LDPR_PREVAILING_DEF*)

Honza
> 
> > Bootstrapped/regtsted x86_64-linux, comitted.
> >
> >         * symtab.c (symtab_node::binds_to_current_def_p): Also accept 
> > symbols
> >         defined in other partition.
> > diff --git a/gcc/symtab.c b/gcc/symtab.c
> > index 207c9e75890..bc2865f4121 100644
> > --- a/gcc/symtab.c
> > +++ b/gcc/symtab.c
> > @@ -2391,7 +2391,7 @@ symbol_table::symbol_suffix_separator ()
> >  bool
> >  symtab_node::binds_to_current_def_p (symtab_node *ref)
> >  {
> > -  if (!definition)
> > +  if (!definition && !in_other_partition)
> >      return false;
> >    if (transparent_alias)
> >      return definition

Reply via email to