gcc 4.3 generates less efficient code than gcc 4.1 or 4.2

Tim Prince TimothyPrince@sbcglobal.net
Thu Jul 3 23:18:00 GMT 2008


Michael Meissner wrote:
> 
> GCC 4.2 switched the default tuning to -mtune=generic which is a compromise
> between the current Intel and AMD systems, each of which have different tuning
> parameters.  Obviously it is a balancing act to get the right compromise, and
> sometimes the generic tuning is wrong.
> 
>> Also, is there a way to *automatically* get the best march value for
>> the local machine? In my case, jobs run on various machines (they're
>> submitted by SGE): they generate C code, compile it locally and run
>> it. I don't even have a direct ssh access to some of these machines.
> 
> -march=native was added in GCC 4.2 will probe the system and set the
> appropriate tuning defaults.  Some Linux vendors have ported the -march=native
> support back to their 4.1 compilers.
> 
There isn't a way for an automatic procedure to guess whether you want the 
better numerical consistency and some newer instructions of-march=native, 
or the often better performance (on Intel 32-bit mode) of -march=pentium-m.



More information about the Gcc-help mailing list