[PATCH] D43911: [AMDGPU] Clean up old address space mapping and fix constant address space value

Tony Tye via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 2 15:25:38 PST 2018


t-tye accepted this revision.
t-tye added a comment.
This revision is now accepted and ready to land.

LGTM except minor comment.



================
Comment at: lib/Basic/Targets/AMDGPU.cpp:41-49
     0, // Default
     1, // opencl_global
     3, // opencl_local
     4, // opencl_constant
     5, // opencl_private
     0, // opencl_generic
     1, // cuda_device
----------------
Could the values be the AddrSpace enumerators?


================
Comment at: lib/Basic/Targets/AMDGPU.cpp:53-61
     5, // Default
     1, // opencl_global
     3, // opencl_local
     4, // opencl_constant
     5, // opencl_private
     0, // opencl_generic
     1, // cuda_device
----------------
Could the values be the AddrSpace enumerators?


================
Comment at: lib/Basic/Targets/AMDGPU.cpp:254
   }
-  auto IsGenericZero = isGenericZero(Triple);
   resetDataLayout(getTriple().getArch() == llvm::Triple::amdgcn
+                      ? DataLayoutStringAMDGCN
----------------
To be consistent should this be:

```
!isAMDGCN(getTriple())
```


https://reviews.llvm.org/D43911





More information about the cfe-commits mailing list