[cfe-commits] r141008 - /cfe/trunk/lib/Basic/Targets.cpp
Justin Holewinski
justin.holewinski at gmail.com
Mon Oct 3 10:28:37 PDT 2011
Author: jholewinski
Date: Mon Oct 3 12:28:37 2011
New Revision: 141008
URL: http://llvm.org/viewvc/llvm-project?rev=141008&view=rev
Log:
PTX: Add some basic support for OpenCL address spaces
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=141008&r1=141007&r2=141008&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Mon Oct 3 12:28:37 2011
@@ -878,6 +878,11 @@
} // end anonymous namespace.
namespace {
+ static const unsigned PTXAddrSpaceMap[] = {
+ 0, // opencl_global
+ 4, // opencl_local
+ 1 // opencl_constant
+ };
class PTXTargetInfo : public TargetInfo {
static const char * const GCCRegNames[];
static const Builtin::Info BuiltinInfo[];
@@ -886,6 +891,7 @@
PTXTargetInfo(const std::string& triple) : TargetInfo(triple) {
TLSSupported = false;
LongWidth = LongAlign = 64;
+ AddrSpaceMap = &PTXAddrSpaceMap;
// Define available target features
// These must be defined in sorted order!
AvailableFeatures.push_back("compute10");
More information about the cfe-commits
mailing list