Shall TODO/comment be added somewhere saying that handling address space number 
of pointers in builtins is still to be implemented?

Also what the number should be for OpenCL? Should it be taken from LangAS::ID 
enum?


REPOSITORY
  rL LLVM

================
Comment at: lib/Sema/SemaExpr.cpp:4393
@@ +4392,3 @@
+
+        Expr *PtrArg = DefaultFunctionArrayLvalueConversion(Arg).get();
+        QualType PtrTy = PtrArg->getType();
----------------
Not sure if this cast might create a problem in some OpenCL-GPU architectures, 
because spec generally disallows conversion between constant and any other 
address spaces (see OpenCL C v2.0 s6.5.5). 

I feel like a better way to handle this would be to create separate builtins 
overloads for constant and generic address space in OpenCL v2.0 and for all 
address spaces in OpenCL <v2.0. But this seems more work to me.

http://reviews.llvm.org/D8082

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to