From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20853 invoked by alias); 11 Nov 2012 21:32:03 -0000 Received: (qmail 20845 invoked by uid 22791); 11 Nov 2012 21:32:03 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 11 Nov 2012 21:31:51 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qABLVp0I027948 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 11 Nov 2012 16:31:51 -0500 Received: from zebedee.pink (ovpn-113-82.phx2.redhat.com [10.3.113.82]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qABLVmqq019216; Sun, 11 Nov 2012 16:31:49 -0500 Message-ID: <50A01944.3020609@redhat.com> Date: Sun, 11 Nov 2012 21:32:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Jeff Law CC: Xin Tong , gcc-help@gcc.gnu.org Subject: Re: gcc compile for code size References: <50A00276.2090002@redhat.com> <50A01210.7020607@redhat.com> <50A013EB.3020402@redhat.com> In-Reply-To: <50A013EB.3020402@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00063.txt.bz2 On 11/11/2012 09:08 PM, Jeff Law wrote: > On 11/11/2012 02:01 PM, Andrew Haley wrote: >> On 11/11/2012 07:59 PM, Xin Tong wrote: >>>> No. GCC does all optimizations *except* those known to increase >>>> program size. This usually works pretty well, but isn't perfect. >>>> >>> so as to how the instructions are selected. compiling for code size >>> does not have an effect ? >> >> Please don't top-post on this list. >> >> Any target could, in principle, select instructions based on size >> and -OS, but I don't know any that do. > Many ports look at at -Os and change their instruction selections, > alignment requests, etc. > > grep for "optimize_size" in the machine descriptions... Oops, sorry. While "I don't know" was true, it wasn't very helpful. I do now! Andrew.