On Thu, May 05, 2022 at 09:06:45AM -0400, Marek Polacek via Gcc-patches wrote:
> On Thu, May 05, 2022 at 02:31:05PM +0200, Martin Liška wrote:
> > Some parts of the compiler already define:
> > #define likely(cond) __builtin_expect ((cond), 1)
> > 
> > So the patch should unify it.

> That's funny, yesterday I added another one: 
> cp/parser.cc:cp_parser_init_declarator
> which is not replaced in this patch.
> 
> I would've preferred the name gcc_{,un}likely but I don't want to start
> a long bikeshedding...

GCC_LIKELY is fine with me.  A bare LIKELY isn't though.  We have much
more common macros having LIKELY in the name already (PROB_*LIKELY,
CLASS_LIKELY_SPILLED, the various IPA things, loop versioning, etc.),
but also we have LIKELY and UNLIKELY as function arguments in various
places.


Segher

Reply via email to