GCC code generation sucks.... ([SunRescue] IPC dead as doornail... possible causes? )

James Lockwood rescue at sunhelp.org
Mon Apr 30 00:28:55 CDT 2001


On Mon, 30 Apr 2001, Joshua D. Boyd wrote:

> Part of the intel advantage is that Intel tells people how to optimize for
> their chips and I'm told contributes code to GCC.  I don't know about now,
> but historically other platforms released their ASM spec, but not all the
> detailed optimization information.

The Sun UltraSparc users guides give a very comprehensive explanation of
optimization at the pipeline level.  The problem is that everyone who
really needs tight C code has already gone over to Workshop/Forte/etc and
isn't putting time into getting gcc fixed.  Heck, look how long it took
them to get fully functional 64-bit SPARC code compiled (is long double
still knackered after all this time?).

Most of my CPU-intensive code (vector math etc) gets a decent speedup by
compiling with Workshop over compiling with gcc.  Handcoding in assembly
gives another boost, usually of similar magnitude.  I wouldn't say that
gcc/sparcv9 is as bad as gcc/alpha but it's definitely suboptimal.  The
answer, as always, is to contribute fixes to gcc.  The peephole INSN
optimizer needs an overhaul, that's for sure, to say nothing of the back
end code generator.

I'm not denigrating the gcc project in any way, the portability it's
achieved is remarkable.  I just wish more people had more time to
contribute code.

Handcoding in VIS naturally makes things rip.  I love using fpmerge to
double 8-bit data en masse.

-James




More information about the rescue mailing list