This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] tuning gcc for Intel Core2


On Wed, Nov 15, 2006 at 05:47:19PM -0800, H. J. Lu wrote:
> On Wed, Nov 15, 2006 at 05:49:13PM -0500, Vladimir Makarov wrote:
> > H. J. Lu wrote:
> > 
> > >On Tue, Nov 14, 2006 at 07:49:56AM -0800, H. J. Lu wrote:
> > > 
> > >
> > >>Can you turn on x86_rep_movl_optimal for -mtune=generic to see what
> > >>it does for SPEC CPU 2K on both 32bit and 64bit?
> > >>
> > >>   
> > >>
> > >
> > >
> > >So for 64bit, -O2 + x86_rep_movl_optimal is better than -O2 and
> > >-O2 -mtune=core2 on Core 2 Duo and Nocona. I suspect that we will
> > >see similar trend on Opteron.
> > >
> > > 
> > >
> > I've got about the same numbers for generic + x86_rep_movl_optimal. 
> > Although with -m32 generic + x86_rep_movl_optimal is a bit worse than 
> > -mtune=core2 (1836 vs 1841 for SPECINT and 1477 vs 1484 for SPECFP).  It 
> > is in the range of measurement error.  But again code size is smaller 
> > (0.73% and 0.66% correspondingly for SPECInt and SPECFp).
> 
> That is expected. 32bit memory functions aren't as bad as 64bit. Now,
> the question is if we should turn on x86_rep_movl_optimal for
> m_GENERIC64. I will investigate it on SPEC CPU 2000/2006 with optimized
> memory functions.

I found the following on Core 2 Duo:

1. The optimized memory functions don't help SPEC CPU 2K FP much.
2. The optimized memory functions help SPEC CPU 2K INT:
			-O2 + optimized memory vs -O2
164.gzip                         1.44928%
175.vpr                          -0.522952%
176.gcc                          23.6236%
181.mcf                          -1.30276%
186.crafty                       -0.576258%
197.parser                       0.64%
252.eon                          0.480769%
253.perlbmk                      -1.60281%
254.gap                          -0.406504%
255.vortex                       10.6028%
256.bzip2                        0.0993542%
300.twolf                        -0.0783392%
Est. SPECint_base2000            2.457%

3. rep_movl_optimal + optimized memory functions don't help SPEC CPU
2K FP much.
4. rep_movl_optimal + optimized memory functions is a mixed bag on
SPEC CPU 2K INT:

164.gzip                         0%
175.vpr                          -0.233645%
176.gcc                          -2.18623%
181.mcf                          1.10876%
186.crafty                       0.772798%
197.parser                       -0.317965%
252.eon                          -0.438596%
253.perlbmk                      1.58919%
254.gap                          0.272109%
255.vortex                       0.231929%
256.bzip2                        0%
300.twolf                        0.117601%
Est. SPECint_base2000            0.0959233%

Given that rep_movl_optimal improves 176.gcc significantly with the
old memory fuctions and doesn't have no significant negative impact
with optimized memory functions, I think we should turn it on for
m_GENERIC64. We can always fine tune rep_movl_optimal later.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]