[PATCH] D23086: [OpenCL] Generate concrete struct type for ndrange_t

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 19 08:48:38 PDT 2016


Anastasia added a comment.

Just to summarize, it seems there are the following options to proceed, each has some benefits and disadvantages:

1. We can check the canonical type. This gives us possibility to accept the type name aliases, but reduces flexibility to implement this type in a custom way.
2. Identify the type by its name. The issue here is that any type alias via typedef will be treated as a different to ndrange_t (event though it's locally not).  One solution to this issue could be to check the typedef chain? At the end I am not sure how critical this is at all to be able to create a typedef of ndrange_t. This approach generally allows vendors to define the type in any suitable way.
3. We can also drop semantical checks for this type completely and let it to a vendor implementation to define and manipulate the type. This offers the most of flexibility but moves more responsibilities to vendor implementations too.

I am more in favor of either 1st or 2nd option, but the last one could work too.


Repository:
  rL LLVM

https://reviews.llvm.org/D23086





More information about the cfe-commits mailing list