Don wrote:rbarreira wrote:Vincent if you say GCC sucks on AMD, what is a better compiler for AMD?
Vincent tends to be highly opinionated - but he is deal wrong about GCC being horribly slow, etc. Also he tends to use hyperbole to emphasize his points.
Sometimes he is right on the money, but for the most part you have to take what he says with a grain of salt.
Also:
http://developer.amd.com/tools/opensour ... fault.aspx
AMD recognizes that the GNU toolchain plays a critical part in the software development ecosystem, and therefore has been actively contributing to its evolution for over a decade. As far back as 2001, AMD developers and analysts have brought cutting edge code generation and reliability improvements for all x86 platforms to the GCC, glibc, binutils, GDB projects.
We feel strongly about our role, as a part of the greater open source community, to drive the quality and adoption of GCC and other components of the GNU project. AMD maintains close relationships with operating systems and compiler teams at major linux distribution vendors, as well as with GNU tools developers. These collaborations ensure that distributions include relevant GNU toolchain support for AMD platforms and help future-proof software products, and to analyze cutting edge instruction sets.
Facts speak for themselves:
GCC has a horrible PGO still. Wins just 7% on intel processors against icc winning 20-25% and visual studio wins 22%+.
Now where GCC 4.7.0 speeded up a lot compared to 4.4 / 4.5 series on intel hardware, i see no visible difference (or it must be somewhere around a 1% or less) between GCC 4.7.0 versus 4.4/4.5 on AMD hardware.
The reason is seemingly GCC prematurely rewrites simple branches to complex vehicles that afterwards do not get considered for the pgo to be optimized. yet this rewrite does slow down GCC on both architectures, AMD and intel, and especially on AMD get hit hard with it.
I'm guessing most bitboarders hardly have those branches.
I'm sure the reason AMD gets hit hard by GCC is the fact it just wins 7% with pgo. That's 7% at intel hardware, not at AMD hardware. 7% is very little. They have to pay a price for changing code into something objectively slower than it can be.
Even AMD's own compiler wins a whopping 30-40% with pgo.
GCC still is the same sabotaged compiler from AMD's viewpoint.
Now that AMD has a massive disadvantage in number of cores versus intel, that would no longer be needed i'd guess for intel to seem faster.
The pgo of ICC wins a whopping 25% for Diep on older K7 for example when using "p3 settings" at a bit older ICC versions.
I remember how old GCC's had a similar problem in terms of lagging behind. AMD then paid someone (if i remember well at SUSE) to improve the GCC compiler, which resulted in GCC's massive improvement from 3.x to 4.0+ within 1 year or so.
Maybe AMD should consider doing the same again instead of betting on their own compiler.