Commit 4c8b65db authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: Remove INNODB_COMPILER_HINTS

There should be no point to disable branch prediction hints or prefetch.
parent c22dff21
...@@ -504,7 +504,7 @@ contains the sum of the following flag and the locally stored len. */ ...@@ -504,7 +504,7 @@ contains the sum of the following flag and the locally stored len. */
#endif /* CHECK FOR GCC VER_GT_2 */ #endif /* CHECK FOR GCC VER_GT_2 */
/* Some macros to improve branch prediction and reduce cache misses */ /* 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'. */ /* Tell the compiler that 'expr' probably evaluates to 'constant'. */
# define UNIV_EXPECT(expr,constant) __builtin_expect(expr, constant) # define UNIV_EXPECT(expr,constant) __builtin_expect(expr, constant)
/* Tell the compiler that a pointer is likely to be NULL */ /* Tell the compiler that a pointer is likely to be NULL */
...@@ -524,16 +524,11 @@ it is read or written. */ ...@@ -524,16 +524,11 @@ it is read or written. */
# define UNIV_EXPECT(expr,value) (expr) # define UNIV_EXPECT(expr,value) (expr)
# define UNIV_LIKELY_NULL(expr) (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) sun_prefetch_read_many((void*) addr)
# define UNIV_PREFETCH_R(addr) ((void) 0) # define UNIV_PREFETCH_R(addr) ((void) 0)
# define UNIV_PREFETCH_RW(addr) sun_prefetch_write_many(addr) # define UNIV_PREFETCH_RW(addr) sun_prefetch_write_many(addr)
# else
# define UNIV_PREFETCH_R(addr) ((void) 0) # elif defined __WIN__
# define UNIV_PREFETCH_RW(addr) ((void) 0)
# endif /* COMPILER_HINTS */
# elif defined __WIN__ && defined COMPILER_HINTS
# include <xmmintrin.h> # include <xmmintrin.h>
# define UNIV_EXPECT(expr,value) (expr) # define UNIV_EXPECT(expr,value) (expr)
# define UNIV_LIKELY_NULL(expr) (expr) # define UNIV_LIKELY_NULL(expr) (expr)
......
...@@ -70,14 +70,6 @@ IF(UNIX) ...@@ -70,14 +70,6 @@ IF(UNIX)
ENDIF() ENDIF()
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") SET(MUTEXTYPE "event" CACHE STRING "Mutex type: event, sys or futex")
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU") IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment