This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: branch probability hinting


Frank Ch. Eigler wrote:

> Hi -
> 
> echristo suggests "expect", which I don't like because
> it doesn't have a natural opposite ("unexpect"?).  mrg
> suggests "predict_true". which I don't like because it's
> too verbose.  I like "LIKELY" because it's short,
> eyecatching, and a reversible adjective/adverb that
> suggests a meta-function rather than an ordinary function.
> 
> I'd like to stick with LIKELY/UNLIKELY for now, until
> a better candidate comes along later, riding alongside
> a champion who is eager enough to do the renaming.
> 
> - FChE

The problem I have with

if (LIKELY (test))
  ...code...

is that to a casual reader it looks like it's an actual test for 
something which is likely (a heuristic?) rather than an optimization hint.

Dave


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]