diff options
author | Justin Holewinski <justin.holewinski@gmail.com> | 2011-10-03 17:28:37 +0000 |
---|---|---|
committer | Justin Holewinski <justin.holewinski@gmail.com> | 2011-10-03 17:28:37 +0000 |
commit | 25bedca83404020665b7246d537bda85492a2b3e (patch) | |
tree | 84684facc461fecd5ce954204e5794db9e91de53 | |
parent | 7035f310f5cfedb35ee4422bcab98e9f18f4ce63 (diff) |
PTX: Add some basic support for OpenCL address spaces
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141008 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Basic/Targets.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 74d3b7c8cc..fc026d783e 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -878,6 +878,11 @@ public: } // 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 @@ namespace { 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"); |