From patchwork Thu Dec 2 15:42:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 73982 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 524BBB6F11 for ; Fri, 3 Dec 2010 02:42:40 +1100 (EST) Received: (qmail 27926 invoked by alias); 2 Dec 2010 15:42:38 -0000 Received: (qmail 27911 invoked by uid 22791); 2 Dec 2010 15:42:37 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-qw0-f47.google.com (HELO mail-qw0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Dec 2010 15:42:31 +0000 Received: by qwg5 with SMTP id 5so7300553qwg.20 for ; Thu, 02 Dec 2010 07:42:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.11.72 with SMTP id s8mr171481qas.115.1291304549810; Thu, 02 Dec 2010 07:42:29 -0800 (PST) Received: by 10.220.61.13 with HTTP; Thu, 2 Dec 2010 07:42:29 -0800 (PST) In-Reply-To: References: <4CBD7F43.3050209@codesourcery.com> <159AA491-9386-49D7-8E05-11A7CFB624E1@codesourcery.com> <20101201000032.GA12932@bromo.med.uc.edu> <6FE46EA8-917C-4513-880A-774E6F475643@codesourcery.com> Date: Thu, 2 Dec 2010 07:42:29 -0800 Message-ID: Subject: Re: 0005-Switch-Core-2-to-new-tuning From: "H.J. Lu" To: Uros Bizjak Cc: Maxim Kuvyrkov , Jack Howarth , Richard Henderson , gcc-patches X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Wed, Dec 1, 2010 at 1:50 PM, Uros Bizjak wrote: > On Wed, Dec 1, 2010 at 10:37 AM, Maxim Kuvyrkov wrote: >> On Dec 1, 2010, at 3:00 AM, Jack Howarth wrote: >> >>> On Tue, Nov 30, 2010 at 01:51:41PM +0100, Uros Bizjak wrote: >>>> On Tue, Nov 30, 2010 at 1:39 PM, Maxim Kuvyrkov wrote: >>>>> This patch switches Core 2 to "new" tuning that Core i7 uses. >>>>> >>>>> The "new" tuning very much resembles tuning for generic32 and generic64 CPUs.  Generic tuning appears to provide best performance results on Core 2/i7 hardware. >>>>> >>>>> OK for trunk? >>>> >>>> Can you please summarize SPEC2k, SPEC2k6 and Polyhedron results for >>>> patched and unpatched gcc? >>>> >>>> Thanks, >>>> Uros. >>> >>> Uros, >>>   On x86-apple-darwin10, benchmarking the Polyhedron 2005 suite using a dual 2.8 GHz >>> Xeon 2008 MacPro, I get the following results with -mtune=generic and -mtune=core2 >>> at -m64 and -m32. These are for r167305 with both 0005-Switch-Core-2-to-new-tuning >>> and 0006-Core-2-i7-DFA applied. >>> ... >>> It is interesting that at -m32, -mtune=core2 shows a net >>> improvement whereas at -m64 that option is a wash compared >>> to -mtune=generic. >> >> That's what I expected.  Jack, thanks for testing the patches on Polyhedron benchmarks. > > Thanks to H.J. and Jack for the results. These results are no worse > than existing "generic" scheduling. Since this patch is mainly tuning > (with a new DFA, of course), it is OK for mainline even in stage 3. > > We are all looking forward for H.J.'s experimental stuff ;) > Here is the first one. OK for trunk? Thanks. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 97477a0..7e76521 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3495,12 +3495,12 @@ ix86_option_override_internal (bool main_args_p) case PROCESSOR_CORE2_64: ix86_tune = PROCESSOR_CORE2_32; - ix86_schedule = CPU_PENTIUMPRO; + ix86_schedule = CPU_CORE2; break; case PROCESSOR_COREI7_64: ix86_tune = PROCESSOR_COREI7_32; - ix86_schedule = CPU_PENTIUMPRO; + ix86_schedule = CPU_COREI7; break; default: