[PATCH] D32215: Updated PPCG Code Generation for OpenCL compatibility
Philipp Schaad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 20 09:30:56 PDT 2017
PhilippSchaad updated this revision to Diff 95971.
Repository:
rL LLVM
https://reviews.llvm.org/D32215
Files:
lib/CodeGen/PPCGCodeGeneration.cpp
Index: lib/CodeGen/PPCGCodeGeneration.cpp
===================================================================
--- lib/CodeGen/PPCGCodeGeneration.cpp
+++ lib/CodeGen/PPCGCodeGeneration.cpp
@@ -1273,13 +1273,18 @@
///
/// @param is64Bit Are we looking for a 64 bit architecture?
static std::string computeNVPTXDataLayout(bool is64Bit) {
- std::string Ret = "e";
-
- if (!is64Bit)
- Ret += "-p:32:32";
-
- Ret += "-i64:64-v16:16-v32:32-n16:32:64";
-
+ std::string Ret = "";
+
+ if (!is64Bit) {
+ Ret += "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:" \
+ "64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:" \
+ "64-v128:128:128-n16:32:64";
+ } else {
+ Ret += "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:" \
+ "64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:" \
+ "64-v128:128:128-n16:32:64";
+ }
+
return Ret;
}
@@ -1298,7 +1303,7 @@
const ScopArrayInfo *SAI = ScopArrayInfo::getFromId(Id);
Args.push_back(SAI->getElementType());
} else {
- Args.push_back(Builder.getInt8PtrTy());
+ Args.push_back(Builder.getInt8PtrTy(1));
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32215.95971.patch
Type: text/x-patch
Size: 1162 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170420/7fd2e68e/attachment.bin>
More information about the llvm-commits
mailing list