From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10684 invoked by alias); 22 Jun 2005 19:29:30 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 10506 invoked by uid 22791); 22 Jun 2005 19:29:00 -0000 Received: from admin.voldemort.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.9) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 22 Jun 2005 19:29:00 +0000 Received: (qmail 5154 invoked from network); 22 Jun 2005 19:28:58 -0000 Received: from localhost (HELO ?192.168.2.26?) (zack@127.0.0.1) by mail.codesourcery.com with SMTP; 22 Jun 2005 19:28:58 -0000 Message-ID: <42B9BD6E.2090403@codesourcery.com> Date: Wed, 22 Jun 2005 19:29:00 -0000 From: Zack Weinberg User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) MIME-Version: 1.0 To: Sergei Organov CC: Andrew Haley , gcc@gcc.gnu.org Subject: Re: How to replace -O1 with corresponding -f's? References: <878y159mhr.fsf@osv.topcon.com> <17078.52477.408454.106678@zapata.pink> <874qbt9k6k.fsf@osv.topcon.com> In-Reply-To: <874qbt9k6k.fsf@osv.topcon.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-06/txt/msg00979.txt.bz2 Sergei Organov wrote: > Andrew Haley writes: > > >>Sergei Organov writes: >> > Hi, >> > >> > Using gcc compiled from gcc-4_0-branch, in an attempt to see which >> > particular optimization option makes my test case to be mis-optimized, I >> > try to replace -O1 (which toggles on the problem) with corresponding set >> > of -fxxx optimization options. >> >>In general you can't do this. You can turn some optimization passes >>off, though. > > > Sigh :( To be clear - there are a number of optimizations which have no corresponding -f switch, being enabled or disabled solely by "if (optimize)" constructs; the global 'optimize' flag is set by -On (n>0). Similarly, there are places where "if (optimize >= 2)" is the sole trigger. This could be construed a bug, and I do not think there would be objection to patches that add -f options for every such optimization. zw