This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PRE in gcse.c
On Wed, Nov 11, 1998 at 03:50:21PM +0100, Philipp Rumpf wrote:
> There is a whole lot of code in the linux kernel that uses gotos just to
> get the main path in one piece. __builtin_expect would really improve the
> readability of this code without being a performance loss.
Also the code that has an inline function for the fast case and an out
of line function for the slow case, could perhaps be combined.
> There are other things, like loops that are known to execute just once 99.99%
> of the time. Maybe this could be bettered, too (No alignment of this loop,
> for example).
Some loops even execute _zero_ times on average... (for example one
perspective texture mapping algorithm does this). So moving the whole
loop somewhere else would be a win.
This sort of thing can't even be done with gotos, because then you have
to declare variables at a more global scope, which makes the code worse.
-- Jamie