t-tye added inline comments.

================
Comment at: lib/CodeGen/CGDecl.cpp:1115
+  if (AddrTy->getAddressSpace() != ExpectedAddrSpace &&
+      Ty.getAddressSpace() != LangAS::opencl_constant) {
+    address = Address(Builder.CreateAddrSpaceCast(Addr,
----------------
Anastasia wrote:
> Do you need to check this? I thought your change doesn't affect OpenCL 
> because alloca AS == private AS in OpenCL  and constant AS local objects are 
> treated as private const objects anyways.
Given patch D32977 that makes function local variables marked with the constant 
address space treated as static, will they ever be processed by this function 
now? If so then the extra test for opencl_constant would not be needed.


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