- User Since
- Jun 29 2020, 8:43 AM (6 w, 2 d)
Fri, Aug 7
I have amended the relevant test to validate this behaviour in C++ for OpenCL.
Thu, Aug 6
Tue, Jul 21
The code now directly adds the __generic address space to the pointee type.
Mon, Jul 20
Jul 13 2020
Jul 8 2020
I've removed the comments calling for a fix because I no longer feel that this approach needs that. Given the code that already exists, and without changing too much of it, adding address space deduction in both cases seems like the right choice.
Jul 3 2020
I have added a check in deduceOpenCLAddressSpace() to check if the type is dependent, and not deduce the address space if it is. This is a big change in the behaviour of address space deduction, meaning that template variables only receive address spaces when they are being specialized. This is good, but caused a lot of changes in the current test file, which has been included in this patch.
Disregard the last comment, rolling back that diff for now.
Added a guard in deduceOpenCLAddressSpace to stop it from deducing address space for dependent types, as requested.
Jun 30 2020
Essentially, in each pass the type for the variable starts off being extract from the SourceTypeInfo, but since the address space isn't specified, this type is then missing an address space.
Adding the address space deduction then reintroduces the address space to the type.