From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26908 invoked by alias); 11 Nov 2008 23:11:52 -0000 Received: (qmail 26812 invoked by uid 22791); 11 Nov 2008 23:11:52 -0000 X-Spam-Check-By: sourceware.org Received: from atrey.karlin.mff.cuni.cz (HELO atrey.karlin.mff.cuni.cz) (195.113.26.193) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 11 Nov 2008 23:11:15 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 4018) id 699B0F014E; Wed, 12 Nov 2008 00:11:11 +0100 (CET) Date: Tue, 11 Nov 2008 23:14:00 -0000 From: Jan Hubicka To: Diego Novillo Cc: Rafael Espindola , gcc-patches Subject: Re: [lto][patch] Move the call to execute_all_ipa_transforms to cgraphunit.c Message-ID: <20081111231111.GG27401@atrey.karlin.mff.cuni.cz> References: <38a0d8450811110921t4c619461u2f934ddcdc3df5e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) 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: 2008-11/txt/msg00491.txt.bz2 > 2008/11/11 Rafael Espindola : > > > So, which one is your favorite? :-) Assuming disabling the pass has no > > regressions, should I commit that? > > Yes, thanks. Converting pass_set_nothrow_function_flag into an IPA > pass is the right approach. In fact, I like Jan's idea of bundling it > with the const/pure pass. However, that can wait. Could you open a > PR for it? Well, things seems a bit more complicated here. It seems to make sense to do the pass both locally and at IPA level. It probably should be moved to gimple though. I was just looking into inliner heuristics to make it more scalable. On C++ beasts like tramp3d or botan we miss a lot of early optimization oppurtunities because we don't know if functions are const/pure/nothrow. So I am thinking about scheduling simple local pass into early optimizations that will look at current function body and set the flags. (we also need alias analysis in early stages and do some function call regularization). Those should make early optimizers a lot more effective and make inlining heuristics (and IPA in general) fed with a lot less garbage. Current trick of ignoring load/stores for program size metrics has many sick side effects and for tramp3d we tend to handle functions containing over 9000 loads+stores as being cheap to inline (and indeed we optimize those 9000 statement later, but it is all unnecesarily expensive and unsafe in a way that on different code base where loads/stores do not optimize out we will end up inlining very large constructors even at -Os) We tend to simplify function bodies a lot in our late optimization passes quite likely turning them to nothrow that in turn affect size of dwarf2out tables quite a lot, so still doing this late nothrow discovery seems to make sense. So I guess ideally we should have constpure pass handling nothrow too and having option to work either locally or doing IPA propagation and do it on all three stages to be able to clean up the abstraction penalties effectivly... Don't seem to be compilation time overkill here, but I guess little experimentation will be needed. Honza > > > > And if it has? Should I debug the above problem? > > No, it would be too much hassle for no gain. The pass must go away. > > > Diego.