Not only that.. in some sense I think it would be fair to state that for things like the Linux
kernel, some of GCC's more adventurous optimizations are really damaging. (See above thread
for details).
In general, the kernel is probably fairly well-served by a "glorified assembly" C compiler,
whereas gcc has a much broader target. A C-only compiler that did simple intra-procedure
optimization at 10x the speed of GCC might be a win.
Posted Oct 25, 2007 23:37 UTC (Thu) by nix (subscriber, #2304)
[Link]
I don't see why a sort of -O0.5 variant that dikes out 80% of GCC's
optimization passes wouldn't be doable, or maybe even -Okernel that dikes
out just the ones the kernel hackers dislike. The passes mechanism should
be able to do that without especially much difficulty (modulo the existing
problem where some of them don't properly declare their dependencies on
earlier/later passes).
I think I have a project for this weekend... ;}