From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12371 invoked by alias); 11 Nov 2012 21:09:06 -0000 Received: (qmail 12362 invoked by uid 22791); 11 Nov 2012 21:09:05 -0000 X-SWARE-Spam-Status: No, hits=-7.5 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:09:01 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qABL90ab024491 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 11 Nov 2012 16:09:01 -0500 Received: from stumpy.slc.redhat.com (ovpn-113-86.phx2.redhat.com [10.3.113.86]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qABL8xUv018801; Sun, 11 Nov 2012 16:08:59 -0500 Message-ID: <50A013EB.3020402@redhat.com> Date: Sun, 11 Nov 2012 21:09:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 MIME-Version: 1.0 To: Andrew Haley CC: Xin Tong , gcc-help@gcc.gnu.org Subject: Re: gcc compile for code size References: <50A00276.2090002@redhat.com> <50A01210.7020607@redhat.com> In-Reply-To: <50A01210.7020607@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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/msg00062.txt.bz2 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... jeff