From c55d6d8c345223c062dfdbd747fb13a8fd44aad5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 5 Dec 2022 21:50:55 -0800 Subject: Avoid LIKELY/UNLIKELY macros --- common/opthelpers.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'common/opthelpers.h') diff --git a/common/opthelpers.h b/common/opthelpers.h index 5fe455da..105ca89f 100644 --- a/common/opthelpers.h +++ b/common/opthelpers.h @@ -27,12 +27,10 @@ #define alunlikely #endif -#define LIKELY(x) (x) [[allikely]] -#define UNLIKELY(x) (x) [[alunlikely]] - -/* Unlike LIKELY, ASSUME requires the condition to be true or else it invokes - * undefined behavior. It's essentially an assert without actually checking the - * condition at run-time, allowing for stronger optimizations than LIKELY. +/* Unlike the likely attribute, ASSUME requires the condition to be true or + * else it invokes undefined behavior. It's essentially an assert without + * actually checking the condition at run-time, allowing for stronger + * optimizations than the likely attribute. */ #if HAS_BUILTIN(__builtin_assume) #define ASSUME __builtin_assume -- cgit v1.2.3