[Beignet] [PATCH] GBE: disable custom loop unroll for LLVM 3.3/3.4.
Zhigang Gong
zhigang.gong at intel.com
Sun Oct 19 18:33:28 PDT 2014
To fix a build error with LLVM 3.3/3.4.
Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
---
backend/src/llvm/llvm_gen_backend.hpp | 2 ++
backend/src/llvm/llvm_unroll.cpp | 2 ++
2 files changed, 4 insertions(+)
diff --git a/backend/src/llvm/llvm_gen_backend.hpp b/backend/src/llvm/llvm_gen_backend.hpp
index 35b9a75..1ac616a 100644
--- a/backend/src/llvm/llvm_gen_backend.hpp
+++ b/backend/src/llvm/llvm_gen_backend.hpp
@@ -102,8 +102,10 @@ namespace gbe
/*! Passer the printf function call. */
llvm::FunctionPass* createPrintfParserPass();
+#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5
/* customized loop unrolling pass. */
llvm::LoopPass *createCustomLoopUnrollPass();
+#endif
/*! Add all the function call of ocl to our bitcode. */
llvm::Module* runBitCodeLinker(llvm::Module *mod, bool strictMath);
diff --git a/backend/src/llvm/llvm_unroll.cpp b/backend/src/llvm/llvm_unroll.cpp
index bd0dd8c..d74de0d 100644
--- a/backend/src/llvm/llvm_unroll.cpp
+++ b/backend/src/llvm/llvm_unroll.cpp
@@ -15,6 +15,7 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5
#include <set>
#include "llvm/Config/llvm-config.h"
#if LLVM_VERSION_MINOR <= 2
@@ -224,3 +225,4 @@ namespace gbe {
return new CustomLoopUnroll();
}
} // end namespace
+#endif
--
1.8.3.2
More information about the Beignet
mailing list