From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17501 invoked by alias); 12 Nov 2008 00:01:27 -0000 Received: (qmail 17480 invoked by uid 22791); 12 Nov 2008 00:01:27 -0000 X-Spam-Check-By: sourceware.org Received: from nikam-dmz.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 12 Nov 2008 00:00:45 +0000 Received: from localhost (occam.ms.mff.cuni.cz [195.113.18.121]) by nikam.ms.mff.cuni.cz (Postfix) with ESMTP id 1C327153591; Wed, 12 Nov 2008 01:00:42 +0100 (CET) Received: by localhost (Postfix, from userid 16202) id F276C938D6; Wed, 12 Nov 2008 01:00:41 +0100 (CET) Date: Wed, 12 Nov 2008 00:57:00 -0000 From: Jan Hubicka To: Jan Hubicka Cc: Diego Novillo , Rafael Espindola , gcc-patches Subject: Re: [lto][patch] Move the call to execute_all_ipa_transforms to cgraphunit.c Message-ID: <20081112000041.GZ13677@kam.mff.cuni.cz> References: <38a0d8450811110921t4c619461u2f934ddcdc3df5e@mail.gmail.com> <20081111193733.GD27401@atrey.karlin.mff.cuni.cz> <20081111231240.GH27401@atrey.karlin.mff.cuni.cz> <38a0d8450811111531u6e2731c0y7b7d6d75b758ef79@mail.gmail.com> <20081111235225.GI27401@atrey.karlin.mff.cuni.cz> <20081111235839.GJ27401@atrey.karlin.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081111235839.GJ27401@atrey.karlin.mff.cuni.cz> User-Agent: Mutt/1.5.13 (2006-08-11) 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: 2008-11/txt/msg00502.txt.bz2 > > On Tue, Nov 11, 2008 at 18:52, Jan Hubicka wrote: > > > > > It seems that most correct approach would be to turn extern inline > > > functions into static functions before LTO and have pass that will > > > redirect the calls of noninlined bodies to the non-extern inline body > > > (or external call) after inlining. This way we don't lose > > > optimization/information. > > > > Isn't this what the inliner does already? > > No, currently we handle extern inline in quite hackish way. If there is > only extern inline function than we handle is as normal inline with the > difference that body is removed afterwards. > If there is more than one occurence of extern inline (in --combine) or > both extern inline and offline variant (this can be in single C unit), > then we simply disable inlining and panic. > This is all because of DECL sharing, I was never able to get multiple > variants of same function out of C and C++ frontend. ... also extern inline functions remain extern for most of IPA stuff as well as --combine merging that is quite suboptimal. I guess we don't need to care about --combine, but the case where both extern inline and offline is in one unit seems quite important implementation quality bug to me. Honza > > Honza > > > > > > Diego.