I think if there is no triple environment or if the triple environment is 
"opencl", I should always map default address space to 0. Then it should not 
break libclc and previous OpenCL applications.

Sam

-----Original Message-----
From: Tom Stellard via Phabricator [mailto:revi...@reviews.llvm.org] 
Sent: Tuesday, May 23, 2017 9:52 AM
To: Liu, Yaxun (Sam) <yaxun....@amd.com>; rjmcc...@gmail.com; Tye, Tony 
<tony....@amd.com>; anastasia.stul...@arm.com
Cc: tstel...@redhat.com; nhaeh...@gmail.com; Chan, SiuChi 
<siuchi.c...@amd.com>; whch...@gmail.com; Sumner, Brian <brian.sum...@amd.com>; 
cfe-commits@lists.llvm.org
Subject: [PATCH] D32248: CodeGen: Cast alloca to expected address space

tstellar added inline comments.


================
Comment at: cfe/trunk/lib/Basic/Targets.cpp:2037-2038
 
-static const LangAS::Map AMDGPUPrivateIsZeroMap = {
-    4,  // Default
-    1,  // opencl_global
-    3,  // opencl_local
-    2,  // opencl_constant
-    4,  // opencl_generic
-    1,  // cuda_device
-    2,  // cuda_constant
-    3   // cuda_shared
-};
-static const LangAS::Map AMDGPUGenericIsZeroMap = {
-    0,  // Default
-    1,  // opencl_global
-    3,  // opencl_local
-    2,  // opencl_constant
-    0,  // opencl_generic
-    1,  // cuda_device
-    2,  // cuda_constant
-    3   // cuda_shared
+static const LangAS::Map AMDGPUNonOpenCLPrivateIsZeroMap = {
+    4, // Default
+    1, // opencl_global
----------------
Shouldn't this be 0 ?


Repository:
  rL LLVM

https://reviews.llvm.org/D32248



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to