From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29702 invoked by alias); 20 Apr 2011 13:24:10 -0000 Received: (qmail 29685 invoked by uid 22791); 20 Apr 2011 13:24:08 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI 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; Wed, 20 Apr 2011 13:23:53 +0000 Received: from relay2.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 8C5895362F; Wed, 20 Apr 2011 15:23:52 +0200 (CEST) Date: Wed, 20 Apr 2011 13:43:00 -0000 From: Martin Jambor To: Jan Hubicka Cc: gcc-patches@gcc.gnu.org, rguenther@suse.de Subject: Re: Remove vtable_method field in cgraph_node Message-ID: <20110420132351.GA29534@virgil.arch.suse.de> Mail-Followup-To: Jan Hubicka , gcc-patches@gcc.gnu.org, rguenther@suse.de References: <20110417163459.GH5273@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20110417163459.GH5273@kam.mff.cuni.cz> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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/msg01637.txt.bz2 Hi, On Sun, Apr 17, 2011 at 06:34:59PM +0200, Jan Hubicka wrote: > Hi, > > this patch drops vtable_method filed. I never understood what it is > about but reading PR20991 I am convinced that we hit the same > problem with work on new devirutalization code. I implemented what > Mark describe as "ideal solution" there - i.e. teaching cgraph that > virtual functions might become reachable until after inlining. > Since we still can devirutalize in late compilation (that is pretty > much poinless but anyway), we no ahve > can_refer_decl_in_current_unit_p that tests if the function has been > already thrown away. Perhaps we might apply there the observation > about vtable being output somewhere, but I do not think it is safe: > if vtable is COMDAT, we can pretty much also optimize all references > to it out in all compilation unit and up not outputting it. When > vtable is not COMDAT, the methods won't be either and this trick > will not apply. > > Consequently I am dropping the flag. This is very trivial based on > observation that cp_fold_obj_type_ref, the only setter of the flag, > is now dead. Plus the varasm code is no-longer executed at the time > of IPA optimizations that the original patch was fixing. > > Martin, can you please look into why cp_fold_obj_type_ref is no > longer used and if possible get rid of it? It was needed because of LANG_HOOKS_FOLD_OBJ_TYPE_REF which I removed last May (revision 159393) and I somehow left the implementation in place. I'll take care of removing it. Thanks, Martin