This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ipa-visibility TLC 2/n
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jan Hubicka <hubicka at ucw dot cz>, David Edelsohn <dje dot gcc at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Henderson <rth at redhat dot com>, ramrad01 at arm dot com, rdsandiford at googlemail dot com
- Date: Thu, 29 May 2014 19:12:15 +0200
- Subject: Re: ipa-visibility TLC 2/n
- Authentication-results: sourceware.org; auth=none
- References: <CAGWvnykpdrmfigAjx+gXghA7iWx0mo4_7V1YaAhWMh9OQdx14A at mail dot gmail dot com> <20140528223103 dot GB15880 at kam dot mff dot cuni dot cz> <CAGWvnynmW2d7S=fDWOE0g7CKfcO=y+p0v4=0jwhTAuOx+pVbYQ at mail dot gmail dot com> <20140528231723 dot GA31990 at kam dot mff dot cuni dot cz> <87bnuh9fdo dot fsf at talisman dot default>
> Jan Hubicka <hubicka@ucw.cz> writes:
> >> Richard Sandiford wrote the original section anchors implementation,
> >> so he would be a good person to comment about the interaction between
> >> aliases and section anchors.
> >
> > Thanks! Richard, does this patch seem sane?
>
> Looks good to me in principle, but with:
>
> > + struct symtab_node *snode;
> > decl = SYMBOL_REF_DECL (symbol);
> > +
> > + snode = symtab_node (decl);
> > + if (snode->alias)
> > + {
> > + rtx target = DECL_RTL (symtab_alias_ultimate_target (snode)->decl);
> > + SYMBOL_REF_BLOCK_OFFSET (symbol) = SYMBOL_REF_BLOCK_OFFSET (target);
> > + return;
> > + }
>
> is SYMBOL_REF_BLOCK_OFFSET (target) guaranteed to be valid at this point?
> It looked at face value like you'd need a recursive call to place_block_symbol
> on the target before the copy.
My reading was that SYMBOL_REF_BLOCK_OFFSET is computed at DECL_RTL calculation
time. But you are right - it is done by validize_mem that is not done by DECL_RTL.
Shall I just call it on target first?
Honza
>
> Thanks,
> Richard