[PATCH] D89869: [OpenCL] Define OpenCL feature macros for all versions

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 16 06:30:27 PST 2020


Anastasia added a comment.

In D89869#2392032 <https://reviews.llvm.org/D89869#2392032>, @Anastasia wrote:

> In D89869#2388499 <https://reviews.llvm.org/D89869#2388499>, @azabaznov wrote:
>
>> Addressed all concerns except replacing //__opencl_c_int64 //definition into header. The reason for this as follows: this macro should be predefined regardless if clang includes default header or not.
>
> FYI clang doesn't provide full support of OpenCL without the header. In fact, there is ongoing work on making the header included by default without any flag. But I can see that this functionality is related to the frontend and not something that is simply added via libraries so I don't have strong objections for adding it in the clang source code. However, the macro can be added without registering the new extension (see how `__IMAGE_SUPPORT__` is added for example). Right now you are adding a pragma and a target setting that targets can modify without any effect, so I would like to avoid these.
>
> My preference would be if you prepare a separate patch for this. Smaller selfcontained patches are easier and faster to review and also it reduces gaps in testing.

FYI I have added `__opencl_c_int64` in my patch mainly for the demonstration purposed as it is an RFC patch I am not sure when this will be committed. In case you prefer to commit this earlier I will rebase my change in necessary.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89869/new/

https://reviews.llvm.org/D89869



More information about the cfe-commits mailing list