From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7603 invoked by alias); 16 Jan 2013 21:24:20 -0000 Received: (qmail 7538 invoked by uid 22791); 16 Jan 2013 21:24:18 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Jan 2013 21:24:14 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id EA33A541AC7; Wed, 16 Jan 2013 22:24:10 +0100 (CET) Date: Wed, 16 Jan 2013 21:24:00 -0000 From: Jan Hubicka To: Jan Hubicka , Richard Biener , GCC Patches Subject: Re: [PATCH, PR 55264] Do not remove as unreachable any virtual methods before inlining Message-ID: <20130116212410.GB23309@kam.mff.cuni.cz> References: <20130116100127.GA21071@virgil.suse> <20130116112121.GA11708@kam.mff.cuni.cz> <20130116124420.GA26629@kam.mff.cuni.cz> <20130116184224.GA26626@virgil.suse> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130116184224.GA26626@virgil.suse> User-Agent: Mutt/1.5.20 (2009-06-14) 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 X-SW-Source: 2013-01/txt/msg00883.txt.bz2 > On Wed, Jan 16, 2013 at 01:44:20PM +0100, Jan Hubicka wrote: > > > Perhaps could you first change cgraph_non_local_node_p_1 and try to check some code > > > if codegen differs significantly? It should not at all. > > > ipa-cp is the sole user of this flag in IPA passes, so you should know what it does. > > > > Thinking deeper of ipa-cp and local virtuals, I think this is all slipperly. > > Local means that all calls to the functions are explicit and known. Obviously > > if function is virutal and new calls may appear by devirtualization, the local > > flag is bogus. I guess the external functions are the only that may be local > > and virtual because somewhere there must be a vtable reference, but to play > > safe, I would suggest marking all virtuals non-local. > > > > Right, as discussed on IRC, the patch below therfore modifies > cgraph_only_called_directly_or_aliased_p to return false for virtual > functions (which translates into cleared local flag) and the cloning > machinery to clear that flag. > > Bootstrapped and tested on x86_64-linux without any problems. OK for > trunk? OK, thanks! Honza