From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24887 invoked by alias); 13 Oct 2010 12:02:31 -0000 Received: (qmail 24877 invoked by uid 22791); 13 Oct 2010 12:02:30 -0000 X-SWARE-Spam-Status: No, hits=-3.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Oct 2010 12:02:26 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id B8B9F79727; Wed, 13 Oct 2010 14:02:23 +0200 (CEST) Date: Wed, 13 Oct 2010 12:26:00 -0000 From: Martin Jambor To: Benjamin Redelings I Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH, PR 45699] Devirtualize to thunks Message-ID: <20101013120223.GA22809@virgil.arch.suse.de> Mail-Followup-To: Benjamin Redelings I , gcc-patches@gcc.gnu.org References: <4CB4C377.3030305@nescent.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4CB4C377.3030305@nescent.org> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-10/txt/msg01140.txt.bz2 Hi, On Tue, Oct 12, 2010 at 04:22:15PM -0400, Benjamin Redelings I wrote: > Jan Hubicka wrote: > >> Hi, > >> > >> folding of OBJ_TYPE_REFs just takes the function declaration in BINFOs > >> and puts into the call statement. Unfortunately BINFOs do not put the > >> declaration of the proper thunk there and so we might ending up not > >> adjusting the this pointer like in the testcase below. On the other > >> hand, BINFOs do contain the deltas and so the folding code can look up > >> the right thunk in the call graph if need be. This is what the patch > >> below does. > Thank you! That's great. I can now test gcc 4.6 at -O and -O2... > O3 still gives segfaults. No worries. Thanks for testing. > > >> > >> Bootstrapped and tested on x86_64-linux without any issues. OK for > >> trunk? > > > >I guess we should also add an folder that transforms calls to thunk to call to > >the function so inlining and other IPA stuff work? > >At the moment i think both ipa-prop and inliner will get direct calls to thunks wrong. > Should I submit a bugzilla bug for this, as is, or do you need a testcase? > (I'm sure I can get one by whittling down my code, but last time it > took about 4 hours to do this, so if there's a faster way ... :-P) Do you mean the segfaults you are experiencing? Yes, please file a bug for them. If not, then we will remember to revisit this ourselves. Thanks, Martin