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]
Other format: [Raw text]

Re: Change x86 default arch for 4.5?


On Sun, Feb 21, 2010 at 10:53:54PM +0100, Steven Bosscher wrote:
> On Sun, Feb 21, 2010 at 9:22 PM, Erik Trulsson <ertr1013@student.uu.se> wrote:
> > One of the great advantages of much free/open software is the way it
> > will work just fine even on older hardware.
> 
> Yes, but that doesn't change if the compiler changes the default
> target processor.

Yes, it does if the user is using binaries compiled by somebody else,
and that somebody else did not explicitly specify any CPU-flags.

I believe that is the situation when installing most
Linux-distributions for example.


> 
> And, let's face it, most users of gcc don't use it because it is free
> software but because it performs just fine for them. And when it does
> not, they just as easily switch to another compiler.

No, most users of gcc use it beacause it is the default compiler that
came with the system they are using.  
Switching to another compiler is not always as easy as it might be.

> 
> To be competitive with alternatives, is why, IMHO, gcc should target
> newer processors. Because "the other guys" are doing it also, and it
> hurts the gcc user base if gcc chooses to lag behind.

Considering that most code will not run noticably faster just because
you optimize it for the newest CPU, the majority of the user base are
not hurt at all.

> 
> > I think you vastly underestimate the number of older x86 processors in
> > use.
> 
> Yes, of course -- but what is the advantage of using the latest GCC
> for such an older processor? This is something no-one has ever been
> able to explain to me (I've asked before). I can give some
> disadvantages, though.
> 
> The newer compilers usually add nothing much more than support for the
> newer processors and their new instruction sets, and newer compilers
> tend to be tuned for newer processors too (simply because the
> developers work with newer boxes). An older compiler will be no worse
> than a newer compiler for those older processors -- probably sometimes
> even better.

Newer compilers usually have better generic optimizations that are not
CPU-dependent.  Newer compilers also typically have improved support
for new language-features (and new languages for that matter.)
Newer compilers are often better at warning about dubious (or simply
wrong) code making it easier to find bugs in the code.

Plenty of reasons for using a newer compiler regardless of if your
target-CPU is new or old.


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se


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