[PATCH] D31404: [OpenCL] Allow alloca return non-zero private pointer

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 10 11:07:47 PDT 2017


Anastasia added inline comments.


================
Comment at: include/clang/Basic/AddressSpaces.h:32
+  // QualType represents private address space in OpenCL source code.
+  Default = 0,
+
----------------
yaxunl wrote:
> Anastasia wrote:
> > The alloca AS is not taken from the target AS map but from the DataLayout. This keep me wonder whether the explicit Default item is actually needed here....
> For OpenCL, the default addr space is mapped to alloca addr space. For other languages, it is mapped by the address space mapping table.
Ok. BTW, why is it done differently for other languages than OpenCL now? Is it something we missed in the programming model before? Or is it something specific to AMD target support?


https://reviews.llvm.org/D31404





More information about the cfe-commits mailing list