From patchwork Thu Dec 2 15:42:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: 0005-Switch-Core-2-to-new-tuning Date: Thu, 02 Dec 2010 05:42:29 -0000 From: H.J. Lu X-Patchwork-Id: 73982 Message-Id: To: Uros Bizjak Cc: Maxim Kuvyrkov , Jack Howarth , Richard Henderson , gcc-patches 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: