Skip to content

Commit

Permalink
[Docs][OpenCL] Release 9.0 notes for OpenCL
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D66294

llvm-svn: 369758
  • Loading branch information
Anastasia Stulova committed Aug 23, 2019
1 parent 9f06b98 commit d0b88fc
Showing 1 changed file with 90 additions and 3 deletions.
93 changes: 90 additions & 3 deletions clang/docs/ReleaseNotes.rst
Expand Up @@ -46,6 +46,8 @@ sections with improvements to Clang's support for those languages.
Major New Features
------------------

- Experimental support for :ref:`C++ for OpenCL <openclcpp>` has been
added.
- ...

Improvements to Clang's diagnostics
Expand Down Expand Up @@ -133,6 +135,14 @@ C11 Feature Support
C++ Language Changes in Clang
-----------------------------

- Support for the address space attribute in various C++ features was improved,
refer to :ref:`C++ for OpenCL <openclcpp>` for more details. The following
features deviated from OpenCL:

(1) Address spaces as method qualifiers are not accepted yet;

(2) There is no address space deduction.

- ...

C++1z Feature Support
Expand All @@ -152,10 +162,87 @@ Objective-C Language Changes in Clang
// clang used to encode this as "^{NSArray=#}" instead of "@".
const char *s0 = @encode(MyArray *);
OpenCL C Language Changes in Clang
----------------------------------
OpenCL Kernel Language Changes in Clang
---------------------------------------

...
OpenCL C
^^^^^^^^

- Enabled use of variadic macro as a Clang extension.

- Added initial support for implicitly including OpenCL builtin
fuctions using efficient trie lookup generated by TableGen.
A corresponding frontend-only flag ``-fdeclare-opencl-builtins``
has been added to enable trie during parsing.

- Refactored header file to be used for common parts between
regular header added using ``-finclude-default-header`` and trie
based declarations added using ``-fdeclare-opencl-builtins``.

- Improved string formatting diagnostics in printf for vector types.

- Simplified the internal representation of blocks, including their
generation in IR. Furthermore, indirect calls to block function
has been changed to direct function calls.

- Added diagnostics for conversions of nested pointers with
different address spaces.

- Added ``cl_arm_integer_dot_product`` extension.

- Fixed global samplers in OpenCL v2.0.

- Improved math builtin functions with parameters of type ``long
long`` for x86.

.. _openclcpp:

C++ for OpenCL
^^^^^^^^^^^^^^

Experimental support for C++17 features in OpenCL has been added
and backwards compatibility with OpenCL C v2.0 was enabled.
The documentation has been added for supported language features
into :doc:`LanguageExtensions` and :doc:`UsersManual`.

Implemented features are:

- Address space behavior is improved in majority of C++ features:

- Templates parameters and arguments;

- Reference types;

- Type deduction;

- Objects and member functions, including special member
functions;

- Builtin operators;

- Method qualifiers now include address space;

- Address space deduction has been extended for C++ use cases;

- Improved overload ranking rules;

- All standard cast operators now prevent converting address
spaces (except for conversions allowed implicitly). They
can still be cast using C-style cast.

- Vector types as in OpenCL C, including compound vector
initialization.

- OpenCL-specific types: images, samplers, events, pipes, are
accepted. Note that blocks are not supported yet.

- OpenCL standard header in Clang can be compiled in C++ mode.

- Global constructors can be invoked from the host side using
a specific, compiler-generated kernel.

- Overloads with generic address space are added to all atomic
builtin functions, including the ones prior to OpenCL v2.0.

ABI Changes in Clang
--------------------
Expand Down

0 comments on commit d0b88fc

Please sign in to comment.