[PATCH] D31210: [AMDGPU] Switch address space mapping by triple environment

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 24 18:42:51 PDT 2017


yaxunl added inline comments.


================
Comment at: lib/Basic/Targets.cpp:2015
 
-static const unsigned AMDGPUAddrSpaceMap[] = {
-  1,    // opencl_global
-  3,    // opencl_local
-  2,    // opencl_constant
-  4,    // opencl_generic
-  1,    // cuda_device
-  2,    // cuda_constant
-  3     // cuda_shared
+static LangAS::Map AMDGPUPrivateIsZeroMap = {
+    1,  // opencl_global
----------------
t-tye wrote:
> Is there a reason this is no longer const?
sorry, my omission. Will fix it when commit.


================
Comment at: lib/Basic/Targets.cpp:2357
+
+  AddrSpace AS;
 };
----------------
t-tye wrote:
> Could this be const since it is not changed after construction?
Yes. will do.


https://reviews.llvm.org/D31210





More information about the cfe-commits mailing list