engine: reorganize compiler attribute docs

Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
Ronald Caesar
2026-01-12 10:18:25 -04:00
parent e671b6a4f1
commit d54ade0c9f

View File

@@ -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