[PATCH] D43783: [OpenCL] Remove block invoke function from emitted block literal struct

2018-08-17 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. Sorry for digging up an old commit... Apparently this broke block arguments, e.g. the following test case: int foo(int (^ bl)(void)) { return bl(); } int get21() { return foo(^{return 21;}); } int get42() { return foo(^{return 42;}); } In pa

[PATCH] D50738: Remove vestiges of configure buildsystem

2018-08-23 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: CMakeLists.txt:288 -if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE ) - message(FATAL_ERROR "In-source builds are not allowed. CMake would overwrite " -"the makefiles distributed with LLVM. Please create a directory an

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-05-09 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331874: [OpenCL] Restrict various keywords in OpenCL C++ mode (authored by svenvh, committed by ). Changed prior to commit: https://reviews.llvm.org/D46022?vs=144745&id=145904#toc Repository: rC Clan

[PATCH] D46651: [OpenCL] Support placement new/delete in Sema

2018-05-09 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: yaxunl, Anastasia. Herald added a subscriber: cfe-commits. Stop crashing on placement new/delete in OpenCL C++ mode, and reject non-placement new/delete with a diagnostic instead of a crash. Repository: rC Clang https://reviews.llvm.org/D4

[PATCH] D46651: [OpenCL] Support placement new/delete in Sema

2018-05-11 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:2030 + } +} rjmccall wrote: > I think a better interpretation of this rule would be to just error on > attempts to use the standard non-placement operator new/delete instead of > tryi

[PATCH] D51544: [OpenCL] Split opencl-c.h header

2018-09-04 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Headers/opencl-c-common.h:9 +//===--===// + +#ifndef __OPENCL_C_COMMON_H__ Would it be worth having a brief explanation here about what is supposed t

[PATCH] D50104: [OpenCL] Always emit alloca in entry block for enqueue_kernel builtin

2018-08-01 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. You'll probably also need to update `test/CodeGenOpenCL/cl20-device-side-enqueue.cl`; please verify with make/ninja `check-clang`. https://reviews.llvm.org/D50104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D50104: [OpenCL] Always emit alloca in entry block for enqueue_kernel builtin

2018-08-02 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh accepted this revision. svenvh added a comment. This revision is now accepted and ready to land. LGTM, thanks! https://reviews.llvm.org/D50104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-06-07 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. Generalize getOpenCLImageAddrSpace into getOpenCLTypeAddrSpace, such that targets can select the address space per type. No functional changes intended. In particular, this is already covered by test/CodeGenOpenCL/opencl_types.cl . Patch by Simon Perretta. https:

[PATCH] D34024: [OpenCL] Diagnose scoped address-space qualified variables

2017-06-08 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. Variables qualified with the local or const address space may only be declared in the outermost scope of a kernel. Patch by Simon Perretta. https://reviews.llvm.org/D34024 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaOpenC

[PATCH] D34031: [OpenCL] Diagnose some reserved types

2017-06-08 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. Catch uses of the 'long long', 'unsigned long long', and 'long double' reserved types. Remove use of 'long long' in test/Misc/languageOptsOpenCL.cl; it shouldn't have been added there in the first place as the OpenCL specification explicitly forbids it in s6.1.4. In

[PATCH] D33598: [libclang] [OpenCL] Expose CIndex functions for typedef and address space

2017-06-08 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304978: [libclang] Expose typedef and address space functions (authored by svenvh). Changed prior to commit: https://reviews.llvm.org/D33598?vs=100404&id=101918#toc Repository: rL LLVM https://revie

[PATCH] D46651: [OpenCL] Support new/delete in Sema

2018-06-08 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 150535. svenvh retitled this revision from "[OpenCL] Support placement new/delete in Sema" to "[OpenCL] Support new/delete in Sema". svenvh edited the summary of this revision. svenvh added a comment. Relaxed the new/delete restrictions following the Khronos a

[PATCH] D46651: [OpenCL] Support new/delete in Sema

2018-06-11 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 150788. svenvh added a comment. Dropped 2 redundant uses of `getTypePtr()`; minor formatting changes. https://reviews.llvm.org/D46651 Files: lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaExprCXX.cpp lib/Sema/SemaType.cpp test/SemaOpenCLCXX/newdelete.cl Inde

[PATCH] D46651: [OpenCL] Support new/delete in Sema

2018-06-11 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:2030 + } +} rjmccall wrote: > Anastasia wrote: > > svenvh wrote: > > > rjmccall wrote: > > > > I think a better interpretation of this rule would be to just error on > > > > attempts t

[PATCH] D46651: [OpenCL] Support new/delete in Sema

2018-06-14 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC334700: [OpenCL] Support new/delete in Sema (authored by svenvh, committed by ). Repository: rC Clang https://reviews.llvm.org/D46651 Files: lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaExprCXX.cpp lib

[PATCH] D53705: [OpenCL] Postpone PSV address space diagnostic

2018-10-25 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: Anastasia, rjmccall. Herald added subscribers: cfe-commits, yaxunl. In OpenCL C++ mode, the "program scope variable must reside ..." diagnostic is firing early in some cases, potentially confusing the user. It is the first diagnostic reported

[PATCH] D53705: [OpenCL] Postpone PSV address space diagnostic

2018-10-29 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. Unlikely, since address spaces are provided in a different way in OpenCL C++ vs OpenCL C. OpenCL C provides qualifiers such as `global` as part of the language. OpenCL C++ provides template classes such as `cl::global` through a header file. Repository: rC Clang ht

[PATCH] D53871: [OpenCL] Allow clk_event_t comparisons

2018-10-30 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: mantognini. Herald added subscribers: cfe-commits, Anastasia, yaxunl. Also rename `invalid-clk-events-cl2.0.cl` to `clk_event_t.cl` and repurpose it to include both positive and negative clk_event_t tests. Repository: rC Clang https://rev

[PATCH] D53871: [OpenCL] Allow clk_event_t comparisons

2018-11-01 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC345825: Allow clk_event_t comparisons (authored by svenvh, committed by ). Changed prior to commit: https://reviews.llvm.org/D53871?vs=171711&id=172110#toc Repository: rC Clang https://reviews.llvm.

[PATCH] D60775: [libclang] Expose ext_vector_type

2019-04-16 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, arphaman. Herald added a project: clang. Expose `ext_vector_type` through the C API. Repository: rC Clang https://reviews.llvm.org/D60775 Files: bindings/python/clang/cindex.py includ

[PATCH] D60775: [libclang] Expose ext_vector_type

2019-04-17 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL358566: [libclang] Expose ext_vector_type (authored by svenvh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D6

[PATCH] D51411: [OpenCL] Improve diagnostic of argument in address space conversion builtins

2018-09-20 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342638: [OpenCL] Diagnose redundant address space conversion (authored by svenvh, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51411?vs=164

[PATCH] D51727: [OpenCL] Allow zero assignment and comparisons between queue_t type variables

2018-09-25 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342968: [OpenCL] Allow zero assignment and comparisons between queue_t type variables (authored by svenvh, committed by ). Repository: rL LLVM https://reviews.llvm.org/D51727 Files: lib/Sema/SemaExp

[PATCH] D51727: [OpenCL] Allow zero assignment and comparisons between queue_t type variables

2018-09-25 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342968: [OpenCL] Allow zero assignment and comparisons between queue_t type variables (authored by svenvh, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://revie

[PATCH] D52020: [OpenCL] Improve extension-version.cl and to_addr_builtin.cl tests

2018-09-27 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343207: [OpenCL] Improve extension-version.cl and to_addr_builtin.cl tests (authored by svenvh, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org

[PATCH] D43783: [OpenCL] Remove block invoke function from emitted block literal struct

2018-10-02 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. Reverted in r343582, test added in r343583. Repository: rC Clang https://reviews.llvm.org/D43783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D57824: [OpenCL][PR40603] Align the use of extensions in C++ to be backwards compatible with OpenCL C v2.0

2019-02-07 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Frontend/InitPreprocessor.cpp:1063 +auto OpenCLVersion = +LangOpts.OpenCLCPlusPlus ? 200 : LangOpts.OpenCLVersion; +#define OPENCLEXT(Ext) \ Why not

[PATCH] D57824: [OpenCL][PR40603] In C++ preserve backwards compatibility with OpenCL C v2.0

2019-02-07 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh accepted this revision. svenvh added a comment. This revision is now accepted and ready to land. Even nicer to have it only inside the extension logic indeed. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57824/new/ https://reviews.llvm.org/D57824 __

[PATCH] D57946: [libclang] Add attribute support for 'convergent'.

2019-02-11 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC353690: [libclang] Add attribute support for 'convergent'. (authored by svenvh, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57946/new/ https://reviews.ll

[PATCH] D58179: [OpenCL][PR40707] Allow OpenCL C types in C++ mode

2019-02-15 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh accepted this revision. svenvh added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58179/new/ https://reviews.llvm.org/D58179 ___ cfe-commits mailing list cfe-commits@

[PATCH] D62588: [OpenCL] Support logical vector operators in C++ mode

2019-05-30 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362087: [OpenCL] Support logical vector operators in C++ mode (authored by svenvh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https:/

[PATCH] D62657: [OpenCL] Fix OpenCL/SPIR version metadata

2019-05-30 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh accepted this revision. svenvh added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62657/new/ https://reviews.llvm.org/D62657 ___ cfe-commits mailing list cfe-commits@

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-30 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: clang/include/clang/Basic/OpenCLBuiltins.td:298-302 +def write_imagef : Builtin<"write_imagef", +[void_t, + image2d_WO_t, + VectorType, +

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-31 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. Looks good overall, I'd like to propose a few more minor changes to this patch before landing: - isPointer can be a `bit` / `bool` instead of an `int` / `unsigned`. - Renaming the command line option from `-fadd-declare-builtins` to `-fdeclare-opencl-builtins` should hop

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-06-03 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362371: [OpenCL] Declare builtin functions using TableGen (authored by svenvh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://rev

[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-13 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: asavonic. Herald added subscribers: cfe-commits, jfb, yaxunl, mgorny. Herald added a project: clang. Using the -fdeclare-opencl-builtins option will require a way to predefine types and macros such as `int4`, `CLK_GLOBAL_MEM_FENCE`, etc. Move

[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-14 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 204796. svenvh added a comment. Change `IncludeDefaultHeader` and `DeclareOpenCLBuiltins` logic as per @asavonic's comments. Also extend `test/SemaOpenCL/fdeclare-opencl-builtins.cl` to test the interplay of both options. CHANGES SINCE LAST ACTION https

[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-19 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363794: [OpenCL] Split type and macro definitions into opencl-c-base.h (authored by svenvh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63561: [OpenCL] Improve diagnostic for placement new

2019-06-19 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. Without an explicit declaration for placement new, clang would reject uses of placement new with "default new' is not supported in OpenCL C++", suggesting

[PATCH] D64867: [OpenCL] Update comments/diagnostics to refer to C++ for OpenCL mode

2019-07-17 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. It would be good if you could provide some motivation for this change in the description of this review. Comment at: include/clang/Basic/DiagnosticParseKinds.td:1157 -// OpenCL C++. +// C++ for OpenCL. def err_openclcxx_virtual_function : Error<

[PATCH] D64867: [OpenCL] Update comments/diagnostics to refer to C++ for OpenCL mode

2019-07-18 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh accepted this revision. svenvh added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64867/new/ https://reviews.llvm.org/D64867 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D63876: [OpenCL] Define CLK_NULL_EVENT without cast

2019-07-19 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366546: [OpenCL] Define CLK_NULL_EVENT without cast (authored by svenvh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.l

[PATCH] D65102: [OpenCL] Rename lang mode flag for C++ mode

2019-07-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh accepted this revision. svenvh added a comment. This revision is now accepted and ready to land. LGTM! Comment at: include/clang/Frontend/LangStandards.def:177 LANGSTANDARD_ALIAS_DEPR(opencl20, "CL2.0") +LANGSTANDARD_ALIAS_DEPR(openclcpp, "CLC++") It

[PATCH] D65456: [OpenCL] Add generic type handling for builtin functions

2019-07-30 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, kristina, yaxunl. Herald added a reviewer: rengolin. Herald added a project: clang. Generic types are an abstraction of type sets. It mimics the way functions are defined in the OpenCL specifi

[PATCH] D65456: [OpenCL] Add generic type handling for builtin functions

2019-07-30 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. Main changes since D63434 : - Rename List* to Vec*. - Rename TLnn -> TLAll, TLInt, TLFloat. - Apply clang-format. - Improve/update documentation. - Factor out renaming of base types into separate commit. - Change return type of OCL2Qual. -

[PATCH] D65456: [OpenCL] Add generic type handling for builtin functions

2019-08-07 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh marked 23 inline comments as done. svenvh added a subscriber: Pierre. svenvh added inline comments. Comment at: clang/lib/Sema/OpenCLBuiltins.td:51 -// Helper class to store type access qualifiers (volatile, const, ...). -class Qualifier { - string QualName = _QualName; -

[PATCH] D65456: [OpenCL] Add generic type handling for builtin functions

2019-08-07 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 213904. svenvh marked 9 inline comments as done. svenvh added a comment. Addressing review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65456/new/ https://reviews.llvm.org/D65456 Files: clang/lib/Sema/OpenCLBuiltins.td clang/lib/Sema/

[PATCH] D65941: [OpenCL] Fix lang mode predefined macros for C++ mode

2019-08-08 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh accepted this revision. svenvh added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65941/new/ https://reviews.llvm.org/D65941 ___ cfe-commits mailing list cfe-commits@

[PATCH] D65456: [OpenCL] Add generic type handling for builtin functions

2019-08-08 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 214169. svenvh added a comment. - Move checking of GenType compatibility from SemaLookup to TableGen emitter. - Provide more elaborate explanation about combining GenTypes in a declaration. - Add `max`/`min` definitions to cover "sgentype" behavior and add test

[PATCH] D65456: [OpenCL] Add generic type handling for builtin functions

2019-08-08 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh marked 6 inline comments as done. svenvh added inline comments. Comment at: clang/lib/Sema/OpenCLBuiltins.td:116 +// combination of Types and vector sizes. +// +// E.g.: If TypeListField = and VectorList = <1, 2, 4>, then Pierre wrote: > Maybe it would be

[PATCH] D66080: [OpenCL] Ignore parentheses for sampler initialization

2019-08-12 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. The sampler handling logic in SemaInit.cpp would inadvertently treat parentheses around sampler arguments as an implicit cast, leading to an unreachable "

[PATCH] D66080: [OpenCL] Ignore parentheses for sampler initialization

2019-08-12 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368561: [OpenCL] Ignore parentheses for sampler initialization (authored by svenvh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https:

[PATCH] D65456: [OpenCL] Add generic type handling for builtin functions

2019-08-14 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: clang/lib/Sema/OpenCLBuiltins.td:222 +// GenType definitions. +def FGenTypeN : GenericType<"FGenTypeN", TLFloat, VecAndScalar>; +// Generate basic GenTypes. Names are like: GenTypeFloatVecAndScalar. Anastasia wrote: >

[PATCH] D65456: [OpenCL] Add generic type handling for builtin functions

2019-08-14 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 215086. svenvh marked 15 inline comments as done. svenvh added a comment. - Update comments as per review comments. - Rename iterator `List` to `VecSizes` in OpenCLBuiltins.td - Format GenericType definition. CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode

2019-08-15 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: docs/LanguageExtensions.rst:1561 +s3.1.3). For OpenCL it means that implicit conversions are allowed from +named address space except for ``__constant`` to ``__generic`` address space +that is a superset of all others except for ``__const

[PATCH] D66294: [Docs][OpenCL] Release 9.0 notes for OpenCL

2019-08-15 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: docs/ReleaseNotes.rst:173 + +- Added initial support for implicitly including OpenCL BIFs using + efficient trie lookup generated by TableGen. A corresponding mantognini wrote: > If the BIF acronym wasn't introduced befo

[PATCH] D66137: [OpenCL][PR42385] Improve addr space deduction for pointers/references to arrays

2019-08-19 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh accepted this revision. svenvh added a comment. This revision is now accepted and ready to land. LGTM, but please clang-format your patch before committing (esp. spacing around binary operators). Comment at: lib/Sema/SemaType.cpp:7396 + // For pointers/references to ar

[PATCH] D65456: [OpenCL] Add generic type handling for builtin functions

2019-08-19 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369253: [OpenCL] Add generic type handling for builtin functions (authored by svenvh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: http

[PATCH] D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode

2019-08-19 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh accepted this revision. svenvh added a comment. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64418/new/ https://reviews.llvm.org/D64418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[PATCH] D59673: [Clang] Harmonize Split DWARF options with llc

2019-06-21 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. As a followup to r363496, I've added llvm-dwarfdump as a clang test dependency in r364021. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59673/new/ https://reviews.llvm.org/D59673 ___ cfe-comm

[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh marked 3 inline comments as done. svenvh added inline comments. Comment at: cfe/trunk/lib/Headers/opencl-c.h:13638-13640 -#ifndef ATOMIC_VAR_INIT -#define ATOMIC_VAR_INIT(x) (x) -#endif //ATOMIC_VAR_INIT yaxunl wrote: > kzhuravl wrote: > > Any reason this

[PATCH] D63561: [OpenCL] Improve diagnostic for placement new

2019-06-26 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364423: [OpenCL] Improve diagnostic for placement new (authored by svenvh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews

[PATCH] D63876: [OpenCL] Define CLK_NULL_EVENT without cast

2019-06-27 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: Anastasia, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. Defining CLK_NULL_EVENT with a `(void*)` cast has the (unintended?) side-effect that the address space will be fixed (as generic in OpenCL 2.0 mode). The

[PATCH] D63876: [OpenCL] Define CLK_NULL_EVENT without cast

2019-07-03 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. In D63876#1565004 , @Anastasia wrote: > btw, there seems to be the same issue with `reserve_id_t`? Yes, `CLK_NULL_RESERVE_ID` has the same cast. I don't have any use case that is affected by it at the moment, so I left it out of

[PATCH] D53023: Prototype OpenCL BIFs using Tablegen

2019-05-13 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. In D53023#1499942 , @AlexeySotkin wrote: > LGTM! @joey, any idea when it will be landed? This work is being continued in https://reviews.llvm.org/D60763 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53023/new/ https://

[PATCH] D62181: [OpenCL] Support pipe keyword in C++ mode

2019-05-21 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. Support the OpenCL C pipe feature in C++ for OpenCL mode, to preserve backwards compatibility with OpenCL C. Repository: rC Clang https://reviews.ll

[PATCH] D62208: [OpenCL] Enable queue_t and clk_event_t comparisons in C++ mode

2019-05-21 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. Support queue_t and clk_event_t comparisons in C++ for OpenCL mode, to preserve backwards compatibility with OpenCL C. Repository: rC Clang https://r

[PATCH] D62181: [OpenCL] Support pipe keyword in C++ mode

2019-05-22 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC361382: [OpenCL] Support pipe keyword in C++ mode (authored by svenvh, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62181/new/ https://reviews.llvm.org/D6

[PATCH] D62208: [OpenCL] Enable queue_t and clk_event_t comparisons in C++ mode

2019-05-23 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL361467: Enable queue_t and clk_event_t comparisons in C++ mode (authored by svenvh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https:

[PATCH] D62588: [OpenCL] Support logical vector operators in C++ mode

2019-05-29 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. Support logical operators on vectors in C++ for OpenCL mode, to preserve backwards compatibility with OpenCL C. Repository: rC Clang https://reviews.

[PATCH] D62335: [OpenCL][PR41963] Add overloads of old atomics with generic pointer type in C++ mode

2019-05-29 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh accepted this revision. svenvh added a comment. This revision is now accepted and ready to land. LGTM, please address style issue before committing. Comment at: test/Headers/opencl-c-header.cl:79 +{ +atomic_add(a, 1); +} Probably better to follow the

[PATCH] D67713: [OpenCL] Add image query builtin functions

2019-09-18 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, kristina, yaxunl. Herald added a reviewer: rengolin. Herald added a project: clang. Add the image query builtin functions from the OpenCL C specification. Patch by Pierre Gondois and Sven van

[PATCH] D67714: [OpenCL] Add -Wconversion to fdeclare-opencl-builtins test

2019-09-18 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, kristina, yaxunl. Herald added a reviewer: rengolin. Herald added a project: clang. Add the -Wconversion -Werror options to check no unexpected conversion is done. Patch by Pierre Gondois and

[PATCH] D67714: [OpenCL] Add -Wconversion to fdeclare-opencl-builtins test

2019-09-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh marked an inline comment as done. svenvh added inline comments. Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:102 // expected-error@-2{{implicit declaration of function 'get_sub_group_size' is invalid in OpenCL}} +// expected-error@-3{{implicit conversion

[PATCH] D67713: [OpenCL] Add image query builtin functions

2019-09-25 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372833: [OpenCL] Add image query builtin functions (authored by svenvh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.ll

[PATCH] D67714: [OpenCL] Add -Wconversion to fdeclare-opencl-builtins test

2019-09-26 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372975: [OpenCL] Add -Wconversion to fdeclare-opencl-builtins test (authored by svenvh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: ht

[PATCH] D64319: [OpenCL] Add function attributes handling for builtin functions

2019-09-27 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 222197. svenvh edited the summary of this revision. svenvh added a comment. Herald added a reviewer: rengolin. - Rebase onto recent master. - Fix formatting. - Use predefined attribute sets like "Attr.Const" instead of bit lists. CHANGES SINCE LAST ACTION h

[PATCH] D68403: [OpenCL] PR43145: preserve addrspace for class accesses

2019-10-03 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. PR43145 revealed two places where Clang was attempting to create a bitcast without considering the address space of class types during C++ class codegen.

[PATCH] D45873: [OpenCL] Reject virtual functions for OpenCL C++

2018-04-20 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: yaxunl, bader. Herald added a subscriber: cfe-commits. The OpenCL C++ specification doesn't mention restricting virtual inheritance, so leaving that unaffected for now. Repository: rC Clang https://reviews.llvm.org/D45873 Files: includ

[PATCH] D45873: [OpenCL] Reject virtual functions for OpenCL C++

2018-04-20 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 143330. svenvh added a comment. Added a template class test as requested. https://reviews.llvm.org/D45873 Files: include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/LangOptions.def lib/Frontend/CompilerInvocation.cpp lib/Parse/ParseDecl.c

[PATCH] D45873: [OpenCL] Reject virtual functions for OpenCL C++

2018-04-23 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330579: [OpenCL] Reject virtual functions for OpenCL C++ (authored by svenvh, committed by ). Changed prior to commit: https://reviews.llvm.org/D45873?vs=143330&id=143524#toc Repository: rC Clang ht

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: yaxunl, bader. Herald added subscribers: cfe-commits, Anastasia. Restrict the following keywords in the OpenCL C++ language mode, according to Section 2.9 of the OpenCL C++ 1.0 Specification. - dynamic_cast - typeid - goto - register (already

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-25 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Sema/SemaExpr.cpp:3056 + if (LangOpts.OpenCL) + ResTy = Context.getAddrSpaceQualType(ResTy, LangAS::opencl_constant); ResTy = Context.getConstantArrayType(ResTy, LengthI, ArrayType::Normal, Nitpic

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-25 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 143951. svenvh edited the summary of this revision. svenvh added a comment. Implemented most of the restrictions as parser or Sema checks instead. This results in nicer diagnostics too, thanks for the suggestion! For the address space qualifiers such as glob

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 144098. svenvh edited the summary of this revision. svenvh added a comment. Updated patch to reject any thread storage class specifier, not just `thread_local`. Also mark the OpenCL access qualifiers as reserved keywords as per OpenCL C++ 1.0 s2.2, and add a

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: include/clang/Basic/TokenKinds.def:255 +// KEYNOOPENCL - This is a keyword that is not supported in OpenCL C +// nor in OpenCL C++. // KEYALTIVEC - This is a keyword in AltiVec rjmccall wrote: > `KE

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Parse/ParseStmtAsm.cpp:696 +return StmtError(); + } + rjmccall wrote: > You might consider parsing the statement normally and then just diagnosing > after the fact, maybe in Sema. You'd have to add the check in

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 144138. svenvh added a comment. Reject goto in `Sema::ActOnIndirectGotoStmt` too, and add a test for indirect goto. https://reviews.llvm.org/D46022 Files: include/clang/Basic/DiagnosticCommonKinds.td include/clang/Basic/DiagnosticParseKinds.td include

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Parse/ParseStmtAsm.cpp:696 +return StmtError(); + } + rjmccall wrote: > svenvh wrote: > > rjmccall wrote: > > > You might consider parsing the statement normally and then just > > > diagnosing after the fact, ma

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-27 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL331026: [OpenCL] Add separate read_only and write_only pipe IR types (authored by svenvh, committed by ). Herald added a s

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-30 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 144583. svenvh added a comment. Moved thread storage class specifier diagnosing to `ActOnVariableDeclarator`. https://reviews.llvm.org/D46022 Files: include/clang/Basic/DiagnosticCommonKinds.td include/clang/Basic/DiagnosticParseKinds.td include/clang/

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-30 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Parse/ParseStmtAsm.cpp:696 +return StmtError(); + } + rjmccall wrote: > svenvh wrote: > > rjmccall wrote: > > > svenvh wrote: > > > > rjmccall wrote: > > > > > You might consider parsing the statement normally an

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-05-01 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 144745. svenvh edited the summary of this revision. svenvh added a comment. Dropped the `asm` and `goto` restrictions from this patch for now until we have clarification from Khronos. Applied the `thread_local` restrictions to OpenCL C too. https://reviews.

[PATCH] D46382: [OpenCL] Factor out language version printing

2018-05-03 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: rivanvx. Herald added a subscriber: cfe-commits. Generate a printable OpenCL language version number in a single place and select between the OpenCL C or OpenCL C++ version accordingly. Repository: rC Clang https://reviews.llvm.org/D46382

[PATCH] D46382: [OpenCL] Factor out language version printing

2018-05-08 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331766: [OpenCL] Factor out language version printing (authored by svenvh, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D46382?vs=144991&id=

[PATCH] D69072: [OpenCL] Added doc to describe OpenCL support

2019-10-17 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5e962e8d7dc7: [OpenCL] Add doc to describe OpenCL support (authored by svenvh). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D69072?vs=225391&id=225413#toc Repositor

[PATCH] D68403: [OpenCL] PR43145: preserve addrspace for class accesses

2019-10-17 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaf6248cbb9e7: [OpenCL] Preserve addrspace in CGClass (PR43145) (authored by svenvh). Changed prior to commit: https://reviews.llvm.org/D68403?vs=223037&id=225426#toc Repository: rG LLVM Github Monore

[PATCH] D69233: [OpenCL] Support -fdeclare-opencl-builtins in C++ mode

2019-10-20 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, kristina, yaxunl. Herald added a project: clang. Support for C++ mode was accidentally lacking due to not checking the OpenCLCPlusPlus LangOpts version. Repository: rC Clang https://review

[PATCH] D83325: [Sema] Be more thorough when unpacking the AS-qualified pointee for a pointer conversion.

2020-07-23 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. Wondering if stripping the sugar is the right thing to do here, because it means we don't have any sugar on the resulting type if it has gone through the SCS and pointer type reconstruction? > I'm unsure if this is currently broken upstream without other patches to > ex

  1   2   3   4   5   >