Adding extension cl_khr_mipmap_image to clang's OpenCL Extensions and initiated inside AMDGPU Target.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Need to add a test to Misc/amdgcn.languageOptsOpenCL.cl and SemaOpenCL/extension-version.cl
include/clang/Basic/OpenCLExtensions.def | ||
---|---|---|
73 ↗ | (On Diff #64930) | Better to follow the alphabetical order. |
Revised based on Sam's comments. Added to tests Misc\amdgcn.languageOptsOpenCL.cl and SemaOpenCL\extension-version.cl
test/Misc/amdgcn.languageOptsOpenCL.cl | ||
---|---|---|
190 ↗ | (On Diff #65118) | we also need to check the else case for __OPENCL_C_VERSION__ < 200 that cl_khr_mipmap_image is defined and no warning msg for #pragma OPENCL EXTENSION cl_khr_mipmap_image: enable |
test/Misc/amdgcn.languageOptsOpenCL.cl | ||
---|---|---|
188 ↗ | (On Diff #65126) | Can you move this error message down instead of adding 6 lines offset. |
test/SemaOpenCL/extension-version.cl | ||
228 ↗ | (On Diff #65126) | Can you move this error message down instead of adding 6 lines offset. |
test/Misc/amdgcn.languageOptsOpenCL.cl | ||
---|---|---|
188 ↗ | (On Diff #65126) | This warning is only for opencl version < 200. The extension is supported by OpenCL 2.0 and above only. |
test/Misc/amdgcn.languageOptsOpenCL.cl | ||
---|---|---|
188 ↗ | (On Diff #65126) | I've added this error message here because I am following the order inside include/clang/Basic/OpenCLExtensions.def. Seems it is alphabetical there and in same order here. What do you think? |
test/SemaOpenCL/extension-version.cl | ||
228 ↗ | (On Diff #65126) | I've added this error message here because I am following the order inside include/clang/Basic/OpenCLExtensions.def. Seems it is alphabetical there and in same order here. What do you think? |
test/Misc/amdgcn.languageOptsOpenCL.cl | ||
---|---|---|
188 ↗ | (On Diff #65126) | This warning is to line 194 which is an else from: #if (__OPENCL_C_VERSION__ < 200) hence OpenCL >= 2.0. There should be no warning in this case? |
test/SemaOpenCL/extension-version.cl | ||
228 ↗ | (On Diff #65126) | Sure that's great! I am just saying could you move the expected-warning line below to where it belongs i.e. line 234 where you are enabling the extension which results in a warning generated. |
test/SemaOpenCL/extension-version.cl | ||
---|---|---|
228 ↗ | (On Diff #65126) | My main problem here is that the check for the warning is too far away from the place that generates it and therefore difficult to understand. If we could restructure this somehow. I think it's also OK to move this line above: #pragma OPENCL EXTENSION cl_khr_mipmap_image: enable This test is already hard to read, let's try to simplify it a bit... |
test/Misc/amdgcn.languageOptsOpenCL.cl | ||
---|---|---|
188 ↗ | (On Diff #65582) | Looks good! Could you just remove indentation please as it's not common for C macros? The same for the test below! |