[cfe-commits] r141390 - /cfe/trunk/lib/Basic/Targets.cpp
Eli Friedman
eli.friedman at gmail.com
Fri Oct 7 12:51:42 PDT 2011
Author: efriedma
Date: Fri Oct 7 14:51:42 2011
New Revision: 141390
URL: http://llvm.org/viewvc/llvm-project?rev=141390&view=rev
Log:
Add address spaces for TCE target. Patch by Pekka Jääskeläinen.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=141390&r1=141389&r2=141390&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri Oct 7 14:51:42 2011
@@ -3053,6 +3053,12 @@
// target processor and program binary. TCE co-design environment is
// publicly available in http://tce.cs.tut.fi
+ static const unsigned TCEOpenCLAddrSpaceMap[] = {
+ 3, // opencl_global
+ 4, // opencl_local
+ 5 // opencl_constant
+ };
+
class TCETargetInfo : public TargetInfo{
public:
TCETargetInfo(const std::string& triple) : TargetInfo(triple) {
@@ -3081,6 +3087,7 @@
"i16:16:32-i32:32:32-i64:32:32-"
"f32:32:32-f64:32:32-v64:32:32-"
"v128:32:32-a0:0:32-n32";
+ AddrSpaceMap = &TCEOpenCLAddrSpaceMap;
}
virtual void getTargetDefines(const LangOptions &Opts,
More information about the cfe-commits
mailing list