Originally posted by lethe
There Ain t No Such Thing As A Free Lunch
ladavacm, i was also under the impression that gcc was the finest compiler ever. is that only true for x86? is it even true at all? is gcc not designed for RISC processors? i was also under the impression that the RISC/CISC designation was anachronistic and no longer accurate. i m no expert though
i know that motorola released a patch for gcc to give it altivec support. i ve also seen that a lot of altivec is being merged into the main tree. i would expect apple to also want to do a lot of work on gcc to make it work well on the PPC architecture, including, but not limited to, improving altivec support.
so is this the case?
and, if there really is no such thing as a free lunch, what is a good compiler for PPC or altivec? the only other compiler that i have ever used is codewarrior. does it stack up?
gcc is a far cry from a good optimizing compiler; the only compiler that I know to be generating worse code is Visual C++ version 5 (the last version at which I have actually taken a deep look)--I cannot comment on others.
gcc is (un)fortunately, free. It also pretty much killed the market for UNIX (C) compilers. It is adequate for most tasks.
By todays terms, the internal architecture of gcc is quite antiquated. It (at least, used to) models an unlimited register machine which is closer to CISC than RISC (if, indeed, there ever were such things; not even the original SPARC was really RISC). With the current processors being more akin to data flow engines emulating CISC or RISC, one really has to know the internals of every CPU generation to keep internal execution units as busy as possible at all times, even though all these generations (claim to) implement the same external programming model. gcc tries to implement such optimizations at a relatively late stage, with insufficient knowledge of the CPU internals (these being the crown jewels of the respective manufacturers)
Improving gcc has become somewhat difficult, and is hampered by the gcc's design goal to be easily re-targettable (i.e. it must be possible to support many different CPUs; therefore the inability to support them really well).
I cannot comment on CodeWarrior, since I have never owned or used it; you must have guessed so far that my background did not include Macs until they became UNIX boxes
But, I would expect Motorola being able to create better compiler than gcc, especially because they are using it for SPEC benchmark suite.