From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20470 invoked by alias); 28 Aug 2010 00:12:23 -0000 Received: (qmail 20443 invoked by uid 22791); 28 Aug 2010 00:12:17 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,TW_FC,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 28 Aug 2010 00:12:09 +0000 Received: from wpaz21.hot.corp.google.com (wpaz21.hot.corp.google.com [172.24.198.85]) by smtp-out.google.com with ESMTP id o7S0C5fu016248 for ; Fri, 27 Aug 2010 17:12:06 -0700 Received: from yxm8 (yxm8.prod.google.com [10.190.4.8]) by wpaz21.hot.corp.google.com with ESMTP id o7S0C4mh006761 for ; Fri, 27 Aug 2010 17:12:04 -0700 Received: by yxm8 with SMTP id 8so1781544yxm.29 for ; Fri, 27 Aug 2010 17:12:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.82.9 with SMTP id f9mr2115065agb.3.1282954323943; Fri, 27 Aug 2010 17:12:03 -0700 (PDT) Received: by 10.91.220.13 with HTTP; Fri, 27 Aug 2010 17:12:03 -0700 (PDT) In-Reply-To: <1282923555.3738.11.camel@MILLC-COREY> References: <1282916665.2100.39.camel@MILLC-COREY> <20100827135005.GO16898@codesourcery.com> <1282921326.2931.17.camel@MILLC-COREY> <1282923555.3738.11.camel@MILLC-COREY> Date: Sat, 28 Aug 2010 01:06:00 -0000 Message-ID: Subject: Re: Better performance on older version of GCC From: Xinliang David Li To: Corey Kasten Cc: Richard Guenther , Nathan Froyd , gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2010-08/txt/msg00416.txt.bz2 Briefly looked at it -- the trunk gcc also regresses a lot compared to the binary you attached. (To match your binary, also added -mfpmath=3D387 -m32 options) Two problems: 1) more register spills in the trunk version -- the old compiler seems more effective in using fp stack registers; 2) the complex multiplication -- the old version emits inline sequence while the trunk version emits call to _muld3c intrinsinc. You can probably file a bug report on this. Thanks, David On Fri, Aug 27, 2010 at 8:39 AM, Corey Kasten wrote: > On Fri, 2010-08-27 at 17:09 +0200, Richard Guenther wrote: >> On Fri, Aug 27, 2010 at 5:02 PM, Corey Kasten >> wrote: >> > On Fri, 2010-08-27 at 06:50 -0700, Nathan Froyd wrote: >> >> On Fri, Aug 27, 2010 at 09:44:25AM -0400, Corey Kasten wrote: >> >> > I find that the executable compiled on system A runs faster (on both >> >> > systems) than the executable compiled on system B (on both system),= by a >> >> > factor about approximately 4 times. I have attempted to play with t= he >> >> > GCC optimizer flags and have not been able to get System B (with the >> >> > later GCC version) to compile code with any better performance. Cou= ld >> >> > someone please help figure this out? >> >> >> >> It's almost impossible to tell what's going on without an actual >> >> testcase. =A0You might not be able to provide the actual code, but you >> >> could try distilling it down to something you could release. >> >> >> >> -Nathan >> > >> > Thanks for the reply Nathan. >> > >> > I have attached an archive with the test case code. The code is built = by >> > build.sh and outputs the number of microseconds to complete the >> > processing. >> > >> > Compiling with GCC version "4.1.2 20070925 (Red Hat 4.1.2-33)" produces >> > code that runs in about 66% of the time than does GCC version "4.3.0 >> > 20080428 (Red Hat 4.3.0-8)" >> >> -fcx-limited-range or -fcx-fortran-rules. =A04.3 now is more conforming = than 4.1. >> >> Richard. >> >> > Thanks >> > >> > Corey >> > > > Richard, > > -fcx-limited-range worked great on both my real benchmark and my test > achive. GCC didn't recognize -fcx-fortran-rules, but obviously I don't > need it. > > Thanks so much, > Corey > > > >