From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23942 invoked by alias); 8 Apr 2008 22:52:04 -0000 Received: (qmail 23931 invoked by uid 22791); 8 Apr 2008 22:52:03 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 08 Apr 2008 22:51:46 +0000 Received: (qmail 25926 invoked from network); 8 Apr 2008 22:51:44 -0000 Received: from unknown (HELO ?192.168.0.2?) (mitchell@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Apr 2008 22:51:44 -0000 Message-ID: <47FBF6FA.70305@codesourcery.com> Date: Tue, 08 Apr 2008 23:06:00 -0000 From: Mark Mitchell User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Jan Hubicka CC: Jan Hubicka , Richard Guenther , gcc-patches@gcc.gnu.org Subject: Re: Patch ping... 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> In-Reply-To: <20080408223049.GJ16935@kam.mff.cuni.cz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00731.txt.bz2 Jan Hubicka wrote: > What I think -Os can be really useful for is well maintained code base, > with code size constraints. (Linux kernel) You compile it with -Os and > get small code except for the case you explicitly use __attribute__ > ((hot)). Given the observation that just tiny portion of program is > hot, it in general makes more sense than using -O2/-O3 and cold attribute. That makes sense, but it's only one usage model. Another case is where you want your applications to be small -- perhaps because the whole application is "cold". I'm running on an embedded device, I want to have this application available, but flash is scarce, and I expect to need this application only very rarely; please use no more space than possible. If the user uses something like __attribute__((hot)) to specifically say something about a function that's arguable. But, I think that -Os means *small*. 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". -- Mark Mitchell CodeSourcery mark@codesourcery.com (650) 331-3385 x713