[Beignet] [PATCH 1/3] reset the SPIR target datalayout.
xionghu.luo at intel.com
xionghu.luo at intel.com
Fri Mar 13 01:29:45 PDT 2015
From: Luo Xionghu <xionghu.luo at intel.com>
Signed-off-by: Luo Xionghu <xionghu.luo at intel.com>
---
backend/src/llvm/llvm_bitcode_link.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/backend/src/llvm/llvm_bitcode_link.cpp b/backend/src/llvm/llvm_bitcode_link.cpp
index 17248c0..3bf9613 100644
--- a/backend/src/llvm/llvm_bitcode_link.cpp
+++ b/backend/src/llvm/llvm_bitcode_link.cpp
@@ -237,6 +237,10 @@ namespace gbe
kernels.push_back(f);
}
+ /* the SPIR binary datalayout maybe different with beignet's bitcode */
+ if(clonedLib->getDataLayout() != mod->getDataLayout())
+ mod->setDataLayout(clonedLib->getDataLayout());
+
/* We use beignet's bitcode as dst because it will have a lot of
lazy functions which will not be loaded. */
char* errorMsg;
--
1.9.1
More information about the Beignet
mailing list