sidorovd added inline comments.
================ Comment at: lib/CodeGen/CGCall.cpp:3972 + // we don't want to perform address space cast for it, since that + // leads to casting __private * (default addr space in OpenCL) to + // __global * which is not valid. Create memcpy call instead. ---------------- Anastasia wrote: > sidorovd wrote: > > Anastasia wrote: > > > This statement is incorrect. Private is only default AS in CL versions > > > before 2.0. > > > > > > I feel this can be expressed simpler. I guess the observation here is > > > that if addr space mismatches it has to generate a copy because even if > > > it would be a generic we can't get what the original specific addr space > > > was? So it's safe to generate a copy. > > > This statement is incorrect. Private is only default AS in CL versions > > > before 2.0. > > You are right, thanks! > > > > Still I want to leave the comment almost as is, since it creates a link > > with a previous one on lines 3928-3935. > I feel it doesn't add much value, but rather exactly says what code does. At > least this is definitely obvious from this code: > Create memcpy call if RV is located in an address space different than that > of Agree CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54947/new/ https://reviews.llvm.org/D54947 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits