User Details
- User Since
- Jun 29 2020, 8:43 AM (152 w, 3 d)
Sep 17 2021
I made the implicit destructor always be created in __generic address space.
Sep 13 2021
Sep 10 2021
Sep 9 2021
Looks good!
Aug 19 2021
I made the check into an assert as suggested.
Aug 5 2021
Jul 5 2021
Jun 29 2021
Jun 11 2021
Jun 10 2021
Added a comment explaining what the check is meant for.
Jun 9 2021
Jun 8 2021
I've reverted to using Constructors and prioritizing based on which constructor is the most qualified.
I've added a check in the constructor for CastOperator that removes qualifiers for non-class, non-array types.
I had to add a check for ObjectiveC, since they seem to use qualifiers for a lot of language features,
but maybe a better solution would be to remove specific qualifiers instead?
Jun 7 2021
Jun 1 2021
Cleaned up the test by renaming the struct and making the test compile.
May 27 2021
May 26 2021
I've cleaned up the check. The qualifiers of SrcType are removed prior to this function, so only DestType needs to have the address space removed.
Made the check more general, it's no longer OpenCL specific and no longer restricted to just constructors, since the check only requires them to be methods.
May 24 2021
May 21 2021
May 20 2021
May 18 2021
May 17 2021
Relaxed the checks in the codegen test because of failures on platforms with slightly different IR being generated.
May 14 2021
Fixed the code style and added some comments to the tests.
Added a codegen test and clarified what some parts are testing.
May 12 2021
May 11 2021
I tried to add a special case for 3 and 4 element vectors, but that caused issues in codgen, so I've left it as a FIXME for now.
May 7 2021
Removed the address space related changes. This revision now only allows for reinterpret_cast between vectors of the same size.
Apr 30 2021
Fixed formatting.
Fixed merge error
Apr 29 2021
Added a link to the C++ for OpenCL specification and cleaned up the text according to the requests.
Apr 27 2021
Improved the description and example per the feedback.
Apr 23 2021
I noticed that I could move the new check above the diagnostic for program scope variables, and the check during parsing can then be removed, while maintaining good diagnostics.
Apr 22 2021
The only ones that change (in the test cases at least) are as follows:
Here Old is with the current change, and New is with the call to diagnoseOpenCLTypes at parsing removed.
Apr 21 2021
Renamed test as suggested.
Ran git-clang-format.
Inlined the thread_local check and moved static clk_event_t into the appropriate test.
I did not move the thread_local check since NewVD had the wrong value for TSCS, so D was required.
Apr 20 2021
Apr 16 2021
Restricted the checks to C++ for OpenCL and added another test for OpenCL vector types.
Apr 15 2021
Apr 14 2021
Added more exhaustive tests, as well as fixed the diagnostic to allow reference types.
Aug 7 2020
I have amended the relevant test to validate this behaviour in C++ for OpenCL.
Aug 6 2020
Jul 21 2020
The code now directly adds the __generic address space to the pointee type.
Jul 20 2020
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.