From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15489 invoked by alias); 18 Apr 2011 08:58:07 -0000 Received: (qmail 15480 invoked by uid 22791); 18 Apr 2011 08:58:06 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,TW_TM,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 Apr 2011 08:57:50 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id BDF0993987; Mon, 18 Apr 2011 10:57:48 +0200 (CEST) Date: Mon, 18 Apr 2011 09:27:00 -0000 From: Richard Guenther To: Jan Hubicka Cc: gcc-patches@gcc.gnu.org, mjambor@suse.cz Subject: Re: Remove vtable_method field in cgraph_node In-Reply-To: <20110417230342.GB23956@kam.mff.cuni.cz> Message-ID: References: <20110417163459.GH5273@kam.mff.cuni.cz> <20110417230342.GB23956@kam.mff.cuni.cz> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: 2011-04/txt/msg01359.txt.bz2 On Mon, 18 Apr 2011, Jan Hubicka wrote: > > > notice that OBJ_TYPE_REF is useless since foo got devitualized and it holds alive > > > the useless s._vptr.S = &_ZTV1S[2]. We want to drop OBJ_TYPE_REF at time we fold > > > first argument to constant. > > > > At some point we dropped all OBJ_TYPE_REF with direct fn but that lead to > > issues. I'll try to dig up what that was. > > Hah, that sounds really scary, given that OBJ_TYPE_REF should be semantically no-op. > We definitely drop them in tree-ssa-ccp, so if we need to preserve them somehow, that is > probably case where we should. Ah, no. We _did_ that in CCP but now we only adjust the OBJ_TYPE_REF expr in CCP and defer to fold_stmt to eventually "devirtualize" it. See PR45878. Then rev.165435 was necessary, as we dropped OBJ_TYPE_REF for the non-devirtualized call as well. As both cases were because of type conversion issues this should be fixed with separating the call function type as we do now. I'll look into handling copyprop and FRE similarly. Richard.