Include opencl-c.h by default as a module to utilize the automatic AST caching mechanism of clang modules.
Add an option -finclude-default-header to enable default header for OpenCL, which is off by default.
Differential D20444
[OpenCL] Include opencl-c.h by default as a clang module yaxunl on May 19 2016, 12:30 PM. Authored by
Details Include opencl-c.h by default as a module to utilize the automatic AST caching mechanism of clang modules. Add an option -finclude-default-header to enable default header for OpenCL, which is off by default.
Diff Detail Event Timeline
Comment Actions Revised as Anastasia suggested. Add option -finclude-default-header to include OpenCL default header file, which is off by default.
Comment Actions Update the diagnositic msg for fblocks.
Comment Actions LGTM, I think it would be nice if the block related code goes in a separate commit. Thanks! |
I was just thinking whether it would make sense to do the opposite i.e. to have a flag that would enable loading of the header (which won't be loaded by default). This might be better for compatibility.
The issues might arise because the users already have their own BIF declaration mechanisms in place in Clang or because of the parsing speed increase. The latter can affect testing significantly. Does the module mechanism use PCH?
Have you compared the speed with and without including the OpenCL header? Is there any difference?