esp_compiler: generate likely and unlikely macros only when performance optimization is selected as build option
This commit is contained in:
parent
1b76253e0e
commit
668b33dcf3
|
@ -22,7 +22,12 @@
|
|||
* to reorder instructions producing more optimized
|
||||
* code.
|
||||
*/
|
||||
#if (CONFIG_COMPILER_OPTIMIZATION_PERF)
|
||||
#define likely(x) __builtin_expect(!!(x), 1)
|
||||
#define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
#else
|
||||
#define likely(x) (x)
|
||||
#define unlikely(x) (x)
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue