From d54ade0c9f0564bdd17811d55a8dbf24473049ac Mon Sep 17 00:00:00 2001 From: Ronald Caesar Date: Mon, 12 Jan 2026 10:18:25 -0400 Subject: [PATCH] engine: reorganize compiler attribute docs Signed-off-by: Ronald Caesar --- include/bal_attributes.h | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/include/bal_attributes.h b/include/bal_attributes.h index a1b68f9..5b8643a 100644 --- a/include/bal_attributes.h +++ b/include/bal_attributes.h @@ -7,38 +7,22 @@ #define BALLISTIC_ATTRIBUTES_H /* + * BAL_HOT()/BAL_COLD() + * Marks a function as hot or cold. Hot makes the compiller optimize it more + * aggressively. Cold marks the function as rarely executed. + * * Usage: * BAL_HOT bal_error_t emit_instruction(...); */ #if defined(__GNUC__) || defined(__clang__) -/*! - * @brief Marks a function as hit. The compiler will optimize it more - * aggresively. - */ -#define BAL_HOT __attribute__((hot)) - -#else - -#define BAL_HOT - -#endif - -/* - * Usage: - * BAL_COLD bal_error_t emit_instruction(...); - */ - -#if defined(__GNUC__) || defined(__clang__) - -/*! - * @brief Marks a function as rarely executed. - */ +#define BAL_HOT __attribute__((hot)) #define BAL_COLD __attribute__((cold)) #else +#define BAL_HOT #define BAL_COLD #endif