mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:24:12 +08:00
mdbx: check __OPTIMIZE__ for __hot/__cold/__flatten.
This commit is contained in:
parent
72de33c8e9
commit
aacd468c05
6
reopen.h
6
reopen.h
@ -57,7 +57,7 @@
|
|||||||
#endif /* __must_check_result */
|
#endif /* __must_check_result */
|
||||||
|
|
||||||
#ifndef __hot
|
#ifndef __hot
|
||||||
# if defined(NDEBUG) && (defined(__GNUC__) && !defined(__clang__))
|
# if defined(__OPTIMIZE__) && (defined(__GNUC__) && !defined(__clang__))
|
||||||
# define __hot __attribute__((hot, optimize("O3")))
|
# define __hot __attribute__((hot, optimize("O3")))
|
||||||
# elif defined(__GNUC__)
|
# elif defined(__GNUC__)
|
||||||
/* cland case, just put frequently used functions in separate section */
|
/* cland case, just put frequently used functions in separate section */
|
||||||
@ -68,7 +68,7 @@
|
|||||||
#endif /* __hot */
|
#endif /* __hot */
|
||||||
|
|
||||||
#ifndef __cold
|
#ifndef __cold
|
||||||
# if defined(NDEBUG) && (defined(__GNUC__) && !defined(__clang__))
|
# if defined(__OPTIMIZE__) && (defined(__GNUC__) && !defined(__clang__))
|
||||||
# define __cold __attribute__((cold, optimize("Os")))
|
# define __cold __attribute__((cold, optimize("Os")))
|
||||||
# elif defined(__GNUC__)
|
# elif defined(__GNUC__)
|
||||||
/* cland case, just put infrequently used functions in separate section */
|
/* cland case, just put infrequently used functions in separate section */
|
||||||
@ -79,7 +79,7 @@
|
|||||||
#endif /* __cold */
|
#endif /* __cold */
|
||||||
|
|
||||||
#ifndef __flatten
|
#ifndef __flatten
|
||||||
# if defined(NDEBUG) && (defined(__GNUC__) || defined(__clang__))
|
# if defined(__OPTIMIZE__) && (defined(__GNUC__) || defined(__clang__))
|
||||||
# define __flatten __attribute__((flatten))
|
# define __flatten __attribute__((flatten))
|
||||||
# else
|
# else
|
||||||
# define __flatten
|
# define __flatten
|
||||||
|
Loading…
x
Reference in New Issue
Block a user