diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-09-19 12:29:16 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-09-19 12:29:16 +0300 |
commit | 4c8b65db085fb20924d911ae69280bd3fc733f72 (patch) | |
tree | f7d0d0c477c38499e0b11b7eaeb0c79300b2a166 | |
parent | c22dff21a5196c29dd83f9dc9fecf3b4e91259e8 (diff) | |
download | mariadb-git-4c8b65db085fb20924d911ae69280bd3fc733f72.tar.gz |
Cleanup: Remove INNODB_COMPILER_HINTS
There should be no point to disable branch prediction hints or prefetch.
-rw-r--r-- | storage/innobase/include/univ.i | 15 | ||||
-rw-r--r-- | storage/innobase/innodb.cmake | 8 |
2 files changed, 5 insertions, 18 deletions
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index 8de24b1faa0..e5ad408424f 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -504,7 +504,7 @@ contains the sum of the following flag and the locally stored len. */ #endif /* CHECK FOR GCC VER_GT_2 */ /* Some macros to improve branch prediction and reduce cache misses */ -#if defined(COMPILER_HINTS) && defined(__GNUC__) +#ifdef __GNUC__ /* Tell the compiler that 'expr' probably evaluates to 'constant'. */ # define UNIV_EXPECT(expr,constant) __builtin_expect(expr, constant) /* Tell the compiler that a pointer is likely to be NULL */ @@ -524,16 +524,11 @@ it is read or written. */ # define UNIV_EXPECT(expr,value) (expr) # define UNIV_LIKELY_NULL(expr) (expr) -# if defined(COMPILER_HINTS) //# define UNIV_PREFETCH_R(addr) sun_prefetch_read_many((void*) addr) -# define UNIV_PREFETCH_R(addr) ((void) 0) -# define UNIV_PREFETCH_RW(addr) sun_prefetch_write_many(addr) -# else -# define UNIV_PREFETCH_R(addr) ((void) 0) -# define UNIV_PREFETCH_RW(addr) ((void) 0) -# endif /* COMPILER_HINTS */ - -# elif defined __WIN__ && defined COMPILER_HINTS +# define UNIV_PREFETCH_R(addr) ((void) 0) +# define UNIV_PREFETCH_RW(addr) sun_prefetch_write_many(addr) + +# elif defined __WIN__ # include <xmmintrin.h> # define UNIV_EXPECT(expr,value) (expr) # define UNIV_LIKELY_NULL(expr) (expr) diff --git a/storage/innobase/innodb.cmake b/storage/innobase/innodb.cmake index d219977daff..736c2b812f4 100644 --- a/storage/innobase/innodb.cmake +++ b/storage/innobase/innodb.cmake @@ -70,14 +70,6 @@ IF(UNIX) ENDIF() ENDIF() -OPTION(INNODB_COMPILER_HINTS "Compile InnoDB with compiler hints" ON) -MARK_AS_ADVANCED(INNODB_COMPILER_HINTS) - -IF(INNODB_COMPILER_HINTS) - ADD_DEFINITIONS("-DCOMPILER_HINTS") -ENDIF() -ADD_FEATURE_INFO(INNODB_COMPILER_HINTS INNODB_COMPILER_HINTS "InnoDB compiled with compiler hints") - SET(MUTEXTYPE "event" CACHE STRING "Mutex type: event, sys or futex") IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU") |