From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1318 invoked by alias); 10 Apr 2008 10:42:24 -0000 Received: (qmail 1244 invoked by uid 22791); 10 Apr 2008 10:42:23 -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; Thu, 10 Apr 2008 10:42:04 +0000 Received: from localhost (occam.ms.mff.cuni.cz [195.113.18.121]) by nikam.ms.mff.cuni.cz (Postfix) with ESMTP id 3E7DF153594; Thu, 10 Apr 2008 12:42:01 +0200 (CEST) Received: by localhost (Postfix, from userid 16202) id 3FE0393743; Thu, 10 Apr 2008 12:42:01 +0200 (CEST) Date: Thu, 10 Apr 2008 13:36:00 -0000 From: Jan Hubicka To: Mark Mitchell Cc: Jan Hubicka , Jan Hubicka , Richard Guenther , gcc-patches@gcc.gnu.org Subject: Re: Patch ping... Message-ID: <20080410104201.GN16935@kam.mff.cuni.cz> References: <20080405162606.GA22594@atrey.karlin.mff.cuni.cz> <84fc9c000804050953o429fde26jb3938827ff9dc5a@mail.gmail.com> <20080405195910.GF28471@atrey.karlin.mff.cuni.cz> <47FBCEF5.50001@codesourcery.com> <20080408223049.GJ16935@kam.mff.cuni.cz> <47FBF6FA.70305@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47FBF6FA.70305@codesourcery.com> User-Agent: Mutt/1.5.9i 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-04/txt/msg00862.txt.bz2 > > Of course, I don't have any objection with adding a -Os -f > option to do something that's more like "small code, except for places > where you think it really matters". To some degree, I would like to avoid GCC command line explossion. It always seemed to me that it is resonable to make -Os optimize for size unless explicitely stated in program to not do so. On the other hand, at the moment it is more about infrastructure, and I guess we all agree on the other half that -O2 + attribute cold (or other good hint, like abort call or builtin_expect) should lead to optimization for size So I am happy to drop the -Os part of the plot, and make "hot" predicate to always result false for -Os declaring whole compiled application cold. Later we can think of what -f option we want or what -Os behaviour is preferrable. As Andi mentioned, we have problem that -O2 is bit too performance centric for average application in many cases probably making system built with -O2 requiring more memory than it would need and thus be slower. Though I believe we are better in this respect than many other compilers. It might make sense to make -O2 more code size concerned instead of having -Omostly-small or have some -fXXX finetunning for -Os to make -Os useable for applications where speed matters too. But it is better to handle this independently. Just thinking of way how to benchmark this drive my head crazy ;) Honza > > -- > Mark Mitchell > CodeSourcery > mark@codesourcery.com > (650) 331-3385 x713