diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2015-03-16 12:24:10 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2015-03-16 12:24:10 +0800 |
commit | c7831044b1e8f5c0598184887f68a7a3e1e5d85c (patch) | |
tree | 715f191c0dc497b85e250e2904fe97da75b10d07 | |
parent | eb40b6a752897c1e8aef76d5630a997859a978c7 (diff) |
Build: set 3.5 as the stable LLVM version for beignet.
And update document accordingly.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
-rw-r--r-- | CMake/FindLLVM.cmake | 16 | ||||
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | docs/Beignet.mdwn | 11 |
3 files changed, 18 insertions, 11 deletions
diff --git a/CMake/FindLLVM.cmake b/CMake/FindLLVM.cmake index e214437a..c98bc13d 100644 --- a/CMake/FindLLVM.cmake +++ b/CMake/FindLLVM.cmake @@ -23,6 +23,11 @@ else (LLVM_CONFIG_EXECUTABLE) message(FATAL_ERROR "Could NOT find LLVM executable, please add -DLLVM_INSTALL_DIR=/path/to/llvm-config/ in cmake command") endif (LLVM_CONFIG_EXECUTABLE) +SET(LLVM_STABLE_VERSION_MAJOR "3") +SET(LLVM_STABLE_VERSION_MINOR "5") +SET(LLVM_STABLE_VERSION_NODOT "${LLVM_STABLE_VERSION_MAJOR}${LLVM_STABLE_VERSION_MINOR}") +SET(LLVM_STABLE_VERSION "${LLVM_STABLE_VERSION_MAJOR}.${LLVM_STABLE_VERSION_MINOR}") + if (LLVM_FIND_VERSION_MAJOR AND LLVM_FIND_VERSION_MINOR) SET(LLVM_FIND_VERSION_NODOT "${LLVM_FIND_VERSION_MAJOR}${LLVM_FIND_VERSION_MINOR}") execute_process( @@ -33,11 +38,12 @@ if (LLVM_FIND_VERSION_MAJOR AND LLVM_FIND_VERSION_MINOR) if (LLVM_VERSION_NODOT VERSION_LESS LLVM_FIND_VERSION_NODOT) message(FATAL_ERROR "imcompatible LLVM version ${LLVM_VERSION} required ${LLVM_FIND_VERSION}") else (LLVM_VERSION_NODOT VERSION_LESS LLVM_FIND_VERSION_NODOT) - if (LLVM_VERSION_NODOT VERSION_EQUAL LLVM_FIND_VERSION_NODOT) - message(STATUS "find stable LLVM version ${LLVM_VERSION}") - else (LLVM_VERSION_NODOT VERSION_EQUAL LLVM_FIND_VERSION_NODOT) - message(STATUS "find unstable LLVM version ${LLVM_VERSION}") - endif (LLVM_VERSION_NODOT VERSION_EQUAL LLVM_FIND_VERSION_NODOT) + if (LLVM_VERSION_NODOT VERSION_EQUAL LLVM_STABLE_VERSION_NODOT) + message(STATUS "Found stable LLVM version ${LLVM_VERSION}") + else (LLVM_VERSION_NODOT VERSION_EQUAL LLVM_STABLE_VERSION_NODOT) + message(STATUS "\tWarning: found unstable LLVM version ${LLVM_VERSION}") + message(STATUS "\tWarning: Stable version is ${LLVM_STABLE_VERSION}") + endif (LLVM_VERSION_NODOT VERSION_EQUAL LLVM_STABLE_VERSION_NODOT) add_definitions("-DLLVM_${LLVM_VERSION_NODOT}") endif (LLVM_VERSION_NODOT VERSION_LESS LLVM_FIND_VERSION_NODOT) endif (LLVM_FIND_VERSION_MAJOR AND LLVM_FIND_VERSION_MINOR) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b05a0f8..fe36dc40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,7 +96,7 @@ IF (USE_STANDALONE_GBE_COMPILER STREQUAL "true") ELSE (USE_STANDALONE_GBE_COMPILER STREQUAL "true") # Front end stuff we need #INCLUDE(CMake/FindLLVM.cmake) - Find_Package(LLVM 3.3) + Find_Package(LLVM 3.5) SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") ENDIF (USE_STANDALONE_GBE_COMPILER STREQUAL "true") diff --git a/docs/Beignet.mdwn b/docs/Beignet.mdwn index 8845ea1a..0c0c8be5 100644 --- a/docs/Beignet.mdwn +++ b/docs/Beignet.mdwn @@ -38,14 +38,15 @@ with anything older. [http://llvm.org/releases/](http://llvm.org/releases/) -LLVM 3.3 , 3.4 and 3.5 are supported. Till now, the recommended LLVM/CLANG version is 3.5. -There are some severe OpenCL related regression in clang 3.4 version. -**Note about LLVM 3.4** +**The recommended LLVM/CLANG version is 3.5 and/or 3.6** -* If you want to try Clang/LLVM 3.4, you need to disable terminfo: ---disable-terminfo. It's a llvm 3.4 bug. +Based on our test result, LLVM 3.5 has best pass rate on all the test suites. LLVM 3.6 +has slightly less pass rate(caused by one front end bug at clang 3.6) than 3.5 but has +better performance about 3% to 8% for different cases and different targets. +For LLVM 3.3 and 3.4, Beignet still support them, but it may be limited to support the +build and major functions. How to build and install ------------------------ |