mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:44:13 +08:00
mdbx: add __cold/__hot for Elbrus.
This commit is contained in:
parent
a93fafceff
commit
ad4c5d8972
@ -268,7 +268,9 @@
|
|||||||
|
|
||||||
#ifndef __hot
|
#ifndef __hot
|
||||||
# if defined(__OPTIMIZE__)
|
# if defined(__OPTIMIZE__)
|
||||||
# if defined(__clang__) && !__has_attribute(hot)
|
# if defined(__e2k__)
|
||||||
|
# define __hot __attribute__((hot)) __optimize(3)
|
||||||
|
# elif defined(__clang__) && !__has_attribute(hot)
|
||||||
/* just put frequently used functions in separate section */
|
/* just put frequently used functions in separate section */
|
||||||
# define __hot __attribute__((section("text.hot"))) __optimize("O3")
|
# define __hot __attribute__((section("text.hot"))) __optimize("O3")
|
||||||
# elif defined(__GNUC__) || __has_attribute(hot)
|
# elif defined(__GNUC__) || __has_attribute(hot)
|
||||||
@ -283,7 +285,9 @@
|
|||||||
|
|
||||||
#ifndef __cold
|
#ifndef __cold
|
||||||
# if defined(__OPTIMIZE__)
|
# if defined(__OPTIMIZE__)
|
||||||
# if defined(__clang__) && !__has_attribute(cold)
|
# if defined(__e2k__)
|
||||||
|
# define __cold __attribute__((cold)) __optimize(1)
|
||||||
|
# elif defined(__clang__) && !__has_attribute(cold)
|
||||||
/* just put infrequently used functions in separate section */
|
/* just put infrequently used functions in separate section */
|
||||||
# define __cold __attribute__((section("text.unlikely"))) __optimize("Os")
|
# define __cold __attribute__((section("text.unlikely"))) __optimize("Os")
|
||||||
# elif defined(__GNUC__) || __has_attribute(cold)
|
# elif defined(__GNUC__) || __has_attribute(cold)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user