From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26790 invoked by alias); 29 May 2014 17:12:21 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 26710 invoked by uid 89); 29 May 2014 17:12:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 29 May 2014 17:12:19 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 1AE16540AF3; Thu, 29 May 2014 19:12:15 +0200 (CEST) Date: Thu, 29 May 2014 17:12:00 -0000 From: Jan Hubicka To: Jan Hubicka , David Edelsohn , GCC Patches , Richard Henderson , ramrad01@arm.com, rdsandiford@googlemail.com Subject: Re: ipa-visibility TLC 2/n Message-ID: <20140529171214.GB32218@kam.mff.cuni.cz> References: <20140528223103.GB15880@kam.mff.cuni.cz> <20140528231723.GA31990@kam.mff.cuni.cz> <87bnuh9fdo.fsf@talisman.default> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87bnuh9fdo.fsf@talisman.default> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-05/txt/msg02558.txt.bz2 > Jan Hubicka 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