This is the mail archive of the gcc@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]

Re: Re: Pentium 4 GCC Optimizations



Jan Hubicka <jh@suse.cz> wrote:
> > 1. Does GCC have any Pentium 4 specific optimizations?
Kind of.
As a part of porting project to AMD x86-64 CPUs, I've implemented the SSE2
FP support, that is able to make P4 FP match about 5-20% faster in common
case.

For a fun, I've also implemented the -march=pentium4 flag, that alters costs
in code generation, disables code alignment and adds branch prediction hints.

All is in the 3.1 mainline and untuned, as I don't currently have time to play
with it.
The results of SSE code generation are promising, I didn't benchmarked yet
the rest.
> 
> 2. If so, what do they include?
See above.
> 
> 3. If so, in what version were they integrated?
too
> 
> 4. If not, are there plans for optimizations?  When will they be included?
> 
> 5. Have you had a chance to look at the Intel compiler?  If so, what are
> your thoughts and will we be seeing such optimizations in future gcc
> versions
Many optimizations of Intel compiler are missing, but number of them will
need major reorganization of gcc to be implemented well, so I can't tell much
at this point, if for instance, we will support autovectorization or memory
hiearchy optimizations soon.

3.1 also includes some work on profile driven optimization and I do have
primitive patch for data prefetching, that will need major reorganization before
it can be integrated to gcc, as it has aged somewhat.

Hope this helps,
Honza

Honza's P4 optimizations already show up to 70% better performance than either gcc with P-II code options or the Intel compilers, in certain situations, both on linux and Windows.  However, the P4 selections aren't performing consistently well as yet.  Honza has been able to correct those failures of which I was aware in short order, so it looks very good in terms of basic correctness.

The potential gains with partial vectorization depend somewhat on acceptance of 16-byte data alignments, which are quite unpopular on Windows, and taking a great deal of criticism on linux.


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