This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] -cl-ext option can overwrite OpenCL features imported from a module
AbandonedPublic

Authored by AlexeySotkin on Jul 28 2017, 10:42 PM.

Details

Summary

When we compile a PCH cl_khr_fp64 is enabled by default.
And its support is imported alongside with the PCH.
With this patch we can disable features enabled in the PCH we import

Event Timeline

AlexeySotkin created this revision.Jul 28 2017, 10:42 PM
bader added inline comments.Jul 31 2017, 7:41 AM
test/SemaOpenCL/extensions-import.cl
14

You can use #ifdef cl_khr_fp64 to check if extension is supported.

Anastasia added inline comments.Aug 2 2017, 10:01 AM
include/clang/Basic/OpenCLOptions.h
132

May be the name could be setAll since it's doing both enable and disable too.

test/SemaOpenCL/extensions-import.cl
6

Do we need to test w/o PCH here? I think we have similar test coverage in test/SemaOpenCL/extensions.cl.

Also we normally put RUN lines first.

AlexeySotkin abandoned this revision.May 18 2021, 6:17 AM