Index: cfe/branches/release_90/docs/ReleaseNotes.rst =================================================================== --- cfe/branches/release_90/docs/ReleaseNotes.rst +++ cfe/branches/release_90/docs/ReleaseNotes.rst @@ -46,6 +46,8 @@ Major New Features ------------------ +- Experimental support for :ref:`C++ for OpenCL ` has been + added. - ... Improvements to Clang's diagnostics @@ -133,6 +135,14 @@ C++ Language Changes in Clang ----------------------------- +- Support for the address space attribute in various C++ features was improved, + refer to :ref:`C++ for OpenCL ` 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 @@ -152,10 +162,87 @@ // 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 --------------------