lkml.org 
[lkml]   [2004]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [2.6 patch] if ... BUG() -> BUG_ON()
On Tue, 13 Jan 2004 22:32:30 +0100
Adrian Bunk <bunk@fs.tum.de> wrote:

> Hi Andrew,
>
> four months ago, Rolf Eike Beer <eike-kernel@sf-tec.de> sent a patch
> against 2.6.0-test5-bk1 that converted several if ... BUG() to BUG_ON()
> (this might in some cases result in slightly faster code).

You know, I dislike this.

The right fix is to hack gcc to allow functions (in this case, BUG()) to have
an "unlikely" attribute, and therefore know that this branch is unlikely.

Making code slightly less readable for minor (and hopefully temporary)
optimizations is IMHO not a worthy use of your time.

Quick! To the GCC sources! Run!
Rusty.
--
there are those who do and those who hang on and you don't see too
many doers quoting their contemporaries. -- Larry McVoy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.073 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site