[PATCH] D95038: [OpenCL][Docs] Describe tablegen BIFs declaration
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 25 03:24:43 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8fdd5784f0d3: [OpenCL][Docs] Describe tablegen BIFs declarations. (authored by Anastasia).
Herald added a project: clang.
Changed prior to commit:
https://reviews.llvm.org/D95038?vs=318208&id=318938#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95038/new/
https://reviews.llvm.org/D95038
Files:
clang/docs/OpenCLSupport.rst
clang/docs/UsersManual.rst
Index: clang/docs/UsersManual.rst
===================================================================
--- clang/docs/UsersManual.rst
+++ clang/docs/UsersManual.rst
@@ -3021,6 +3021,11 @@
$ clang -target spir-unknown-unknown -c -emit-llvm -Xclang -finclude-default-header -fmodules -fimplicit-module-maps -fmodules-cache-path=<path to the generated module> test.cl
+Another way to circumvent long parsing latency for the OpenCL builtin
+declarations is to use mechanism enabled by ``-fdeclare-opencl-builtins`` flag
+that is available as an experimental feature (see more information in
+:doc:`OpenCLSupport`).
+
OpenCL Extensions
-----------------
Index: clang/docs/OpenCLSupport.rst
===================================================================
--- clang/docs/OpenCLSupport.rst
+++ clang/docs/OpenCLSupport.rst
@@ -112,6 +112,28 @@
<https://lists.llvm.org/mailman/listinfo/cfe-dev>`_ or via `Bugzilla
<https://bugs.llvm.org/>`__.
+Fast builtin function declarations
+----------------------------------
+
+In addition to regular header includes with builtin types and functions using
+``-finclude-default-header`` explained in :doc:`UsersManual`, clang
+supports a fast mechanism to declare builtin functions with
+``-fdeclare-opencl-builtins``. This does not declare the builtin types and
+therefore it has to be used in combination with ``-finclude-default-header``
+if full functionality is required.
+
+**Example of Use**:
+
+ .. code-block:: console
+
+ $ clang -Xclang -finclude-default-header test.cl
+
+Note that this is a frontend-only flag and therefore it requires the use of
+flags that forward options to the frontend, e.g. ``-cc1`` or ``-Xclang``.
+
+As this feature is still in experimental phase some changes might still occur
+on the command line interface side.
+
C++ libraries for OpenCL
------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95038.318938.patch
Type: text/x-patch
Size: 1869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210125/368fcdd5/attachment.bin>
More information about the cfe-commits
mailing list