[PATCH] D93942: [OpenCL] Improve online documentation.

Marco Antognini via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 30 09:14:18 PST 2020


mantognini added a comment.

Looks good, only a few typos and minor comments.



================
Comment at: clang/docs/OpenCLSupport.rst:69
++==============================+==============================================================+======================+===========================================================================+
+| Command line interface       | New value for `-cl-std` flag                                 | :good:`done`         | https://reviews.llvm.org/D88300                                      |
++------------------------------+--------------------------------------------------------------+----------------------+---------------------------------------------------------------------------+
----------------
I'm not sure it matters, but just in case it messes up with the rendering: the last `|` is not aligned.


================
Comment at: clang/docs/UsersManual.rst:2832-2833
+Note that if compiled to bitcode for generic targets such as SPIR,
+portable IR is produced i.e. it can be used with various vendor
+tools as well as open source tools i.e. `SPIRV-LLVM Translator
+<https://github.com/KhronosGroup/SPIRV-LLVM-Translator>`_
----------------



================
Comment at: clang/docs/UsersManual.rst:2864-2868
+Adds builtin function declarations during compilations. By default
+the OpenCL headers are not loaded and therefore the builtin functions
+ are not declared. To load them automatically this flag can be
+passed to the frontend (see also :ref:`the section on the OpenCL Header
+<opencl_header>`):
----------------
This also applies to types I believe (e.g. int2). Maybe this paragraph should be slightly altered to reflect this?


================
Comment at: clang/docs/UsersManual.rst:2875
+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`.
+
----------------



================
Comment at: clang/docs/UsersManual.rst:2877
+
+Alternatively the internal header with the declarations can be added manually
+using ``-include`` or ``-I`` followed by the path to the header
----------------



================
Comment at: clang/docs/UsersManual.rst:2894
 
-Disables support of OpenCL extensions. All OpenCL targets provide a list
+Disables support of OpenCL extensions. All OpenCL targets set a list
 of extensions that they support. Clang allows to amend this using the ``-cl-ext``
----------------
I feel "provide" was slightly better.


================
Comment at: clang/docs/UsersManual.rst:3059
+underscore to avoid clashing with user space identifiers. Vendor extension
+ca have reserved prefix name e.g. amd, arm, intel.
 
----------------



================
Comment at: clang/docs/UsersManual.rst:3242-3245
+in`the latest build
 <https://github.com/KhronosGroup/Khronosdotorg/blob/master/api/opencl/assets/CXX_for_OpenCL.pdf>`_.
+or in `the official release
+<https://github.com/KhronosGroup/OpenCL-Docs/releases/tag/cxxforopencl-v1.0-r1>`_
----------------



================
Comment at: clang/docs/UsersManual.rst:3279-3280
+In OpenCL versions earlier than v2.2 there is no support for invoking global
+constructors. However, an easy workaround would be to manually enqueue the
+constructor initialization kernel that has the following name sceme
+``_GLOBAL__sub_I_<compiled file name>``.
----------------



================
Comment at: clang/docs/UsersManual.rst:3303
+There is no manual workaround for the construction of static objects with non-trivial
+constructors inside the functions.
 
----------------



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

https://reviews.llvm.org/D93942



More information about the cfe-commits mailing list