D32248: CodeGen: Cast alloca to expected address space

Liu, Yaxun (Sam) via cfe-commits cfe-commits at lists.llvm.org
Tue May 23 06:57:13 PDT 2017


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:reviews at reviews.llvm.org] 
Sent: Tuesday, May 23, 2017 9:52 AM
To: Liu, Yaxun (Sam) <Yaxun.Liu at amd.com>; rjmccall at gmail.com; Tye, Tony <Tony.Tye at amd.com>; anastasia.stulova at arm.com
Cc: tstellar at redhat.com; nhaehnle at gmail.com; Chan, SiuChi <siuchi.chan at amd.com>; whchung at gmail.com; Sumner, Brian <Brian.Sumner at amd.com>; cfe-commits at 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





More information about the cfe-commits mailing list