[PATCH] D141008: [Clang][SPIR-V] Emit target extension types for OpenCL types on SPIR-V.

2023-01-05 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. > it may be more appropriate to make these triggered off of a hidden option > defaulted to off for now, or maybe based on whether or not opaque pointers > are enabled There isn't really a meaningful alternative representation for these opaque types when opaque pointers

[PATCH] D141297: [OpenCL] Allow undefining header-only features

2023-01-09 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: Anastasia, FMarno. Herald added subscribers: Naghasan, ldrumm, yaxunl. Herald added a project: All. svenvh requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `opencl-c-base.h` always define

[PATCH] D143348: [Clang][Doc][OpenCL] Release 16 notes

2023-02-06 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: clang/docs/ReleaseNotes.rst:840 + * Fixed conditional definition of the depth image and read_write image3d builtins. + * Added ``nounwind`` attribute to all builtin functions. + It's slightly more than that: clang adds

[PATCH] D141297: [OpenCL] Allow undefining header-only features

2023-01-12 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. In D141297#4043122 , @Anastasia wrote: > Btw I wonder if in the future we could add some error or warning in case > someone uses the same approach for frontend specific features, i.e. > > #ifdef __undef___opencl_c_generic_addres

[PATCH] D141297: [OpenCL] Allow undefining header-only features

2023-01-16 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa60b8f468119: [OpenCL] Allow undefining header-only features (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D138958: [clang] Better UX for Clang’s unwind-affecting attributes

2023-01-18 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: clang/test/CodeGenOpenCL/fdeclare-opencl-builtins.cl:20 // Test that Attr.Const from OpenCLBuiltins.td is lowered to a readnone attribute. +// FIXME: we don't, though. // CHECK-LABEL: @test_const_attr lebedev.ri wrote:

[PATCH] D142033: [OpenCL] Always add nounwind attribute for OpenCL

2023-01-18 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: Anastasia, yaxunl, bader. Herald added subscribers: kosarev, Naghasan, ldrumm, kerbowa, jvesely. Herald added a project: All. svenvh requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Neith

[PATCH] D142033: [OpenCL] Always add nounwind attribute for OpenCL

2023-01-20 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. In D142033#4062671 , @bader wrote: > Should we generalize and rename `clang/test/CodeGenOpenCL/convergent.cl` to > validate function attributes other than `convergent`? It's not obvious that > presence of `nounwind` attribute is

[PATCH] D142033: [OpenCL] Always add nounwind attribute for OpenCL

2023-01-20 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG149521091499: [OpenCL] Always add nounwind attribute for OpenCL (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D126660: [OpenCL] Reword unknown extension pragma diagnostic

2022-06-15 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7acc88be0312: [OpenCL] Reword unknown extension pragma diagnostic (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126660/new/ https://re

[PATCH] D127961: [OpenCL] Reduce emitting candidate notes for builtins

2022-06-16 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. svenvh added a project: clang. Herald added subscribers: Naghasan, ldrumm, yaxunl. Herald added a project: All. svenvh requested review of this revision. Herald added a subscriber: cfe-commits. When overload resolution fails, clang

[PATCH] D127961: [OpenCL] Reduce emitting candidate notes for builtins

2022-06-17 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:11224 + // so do not generate such notes. + if (S.getLangOpts().OpenCL && Fn->isImplicit() && + Cand->FailureKind != ovl_fail_bad_conversion) Anastasia wrote: > It would have been ni

[PATCH] D128434: [OpenCL] Remove half scalar vload/vstore builtins

2022-06-23 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: Anastasia, stuart, azabaznov. svenvh added a project: clang. Herald added subscribers: Naghasan, ldrumm, yaxunl. Herald added a project: All. svenvh requested review of this revision. Herald added a subscriber: cfe-commits. These are not mentio

[PATCH] D128436: [OpenCL] Remove fast_ half geometric builtins

2022-06-23 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: Anastasia, stuart, azabaznov. svenvh added a project: clang. Herald added subscribers: Naghasan, ldrumm, yaxunl. Herald added a project: All. svenvh requested review of this revision. Herald added a subscriber: cfe-commits. These are not mentio

[PATCH] D126660: [OpenCL] Reword unknown extension pragma diagnostic

2022-05-30 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: Anastasia, stuart. svenvh added a project: clang. Herald added subscribers: Naghasan, ldrumm, yaxunl. Herald added a project: All. svenvh requested review of this revision. Herald added a subscriber: cfe-commits. For newer OpenCL extensions tha

[PATCH] D126660: [OpenCL] Reword unknown extension pragma diagnostic

2022-06-01 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. In D126660#3550356 , @Anastasia wrote: > Ok, makes sense! Thanks! > > Btw I was thinking we should provide some way for developers to know what > extensions are being supported either through documentation or by querying > clang

[PATCH] D151339: [OpenCL] Add cl_ext_image_raw10_raw12 extension

2023-07-26 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5e8b44cc447e: [OpenCL] Add cl_ext_image_raw10_raw12 extension (authored by svenvh). Changed prior to commit: https://reviews.llvm.org/D151339?vs=5

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-08-02 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. If we go with this approach, please also remove sqrt from `clang/lib/Sema/OpenCLBuiltins.td` (and ideally add a comment pointing out that sqrt is handled in `opencl-c-base.h`) Comment at: clang/lib/Headers/opencl-c-base.h:832 + +inline float __ovld __c

[PATCH] D137652: Remove mandatory define of optional features macros for OpenCL C 3.0

2022-11-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: clang/include/clang/Basic/OpenCLExtensions.def:123 +OPENCL_OPTIONALCOREFEATURE(__opencl_c_work_group_collective_functions, false, 300, OCL_C_30) +OPENCL_OPTIONALCOREFEATURE(__opencl_c_int64, false, 300, OCL_C_30) I am

[PATCH] D137652: Remove mandatory define of optional features macros for OpenCL C 3.0

2022-11-29 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. > @svenvh I remember that we have also discussed the addition of a vendor > specific header where such feature/extension macro definition can be added to > avoid the macro pollution but I feel this is somewhat orthogonal i.e. the > fine grained control of macro defines i

[PATCH] D74910: [OpenCL] Remove spurious atomic_fetch_min/max builtins

2020-02-20 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: Anastasia, yaxunl. Herald added subscribers: cfe-commits, kristina, jfb. Herald added a project: clang. These declarations use a mix of unsigned and signed argument and return types. This is not defined in OpenCL v2.0 s6.13.11. Repository:

[PATCH] D75125: [Docs][OpenCL] Release 10.0 notes for OpenCL

2020-02-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: clang/docs/ReleaseNotes.rst:293 +- Allowed ``__private`` to be printed explicitly in diagnostics, AST, etc +- Fixed declaration of ``enqueue_marker``, c11 atomic fetch max/min in the + standard header. Suggesting to mov

[PATCH] D75125: [Docs][OpenCL] Release 10.0 notes for OpenCL

2020-02-26 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/D75125/new/ https://reviews.llvm.org/D75125 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D75125: [Docs][OpenCL] Release 10.0 notes for OpenCL

2020-02-27 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh closed this revision. svenvh added a comment. Committed in e5cb70267e7 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75125/new/ https://reviews.llvm.org/D75125 _

[PATCH] D74910: [OpenCL] Remove spurious atomic_fetch_min/max builtins

2020-03-02 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8a37b9e61798: [OpenCL] Remove spurious atomic_fetch_min/max builtins (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74910/new/ https://

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

2019-11-01 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0aed36d261d3: [OpenCL] Support -fdeclare-opencl-builtins in C++ mode (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69233/new/ https://

[PATCH] D68781: [OpenCL] Fix address space for const method call from nonconst

2019-11-01 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 227476. svenvh retitled this revision from "[OpenCL] Fix addr space conversion check in obj arg initialization" to "[OpenCL] Fix address space for const method call from nonconst". svenvh set the repository for this revision to rC Clang. svenvh added a comment

[PATCH] D68781: [OpenCL] Fix address space for const method call from nonconst

2019-11-04 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG82888b78d47e: [OpenCL] Fix address space for const method call from nonconst (PR43145) (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68

[PATCH] D69810: [OpenCL] Fix address space for base method call (PR43145)

2019-11-04 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, ebevhan, yaxunl. Herald added a project: clang. Potentially create an addrspacecast in case the argument is a pointer. Repository: rC Clang https://reviews.llvm.org/D69810 Files: clang/

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

2019-11-05 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9a8d477a0e00: [OpenCL] Add builtin function attribute handling (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64319/new/ https://review

[PATCH] D63557: [OpenCL] Group builtin functions by prototype

2019-11-05 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0e56b0f94bfc: [OpenCL] Group builtin functions by prototype (authored by svenvh). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D63557?vs=222446&id=227833#toc

[PATCH] D69883: [OpenCL] Add math and common builtin functions

2019-11-06 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: Anastasia, Pierre, Nicola. Herald added subscribers: cfe-commits, kristina, yaxunl. Herald added a reviewer: rengolin. Herald added a project: clang. Add the math and common builtin functions from the OpenCL C specification. Patch by Pierre Go

[PATCH] D69810: [OpenCL] Fix address space for base method call (PR43145)

2019-11-06 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh marked an inline comment as done. svenvh added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:4091 +V = Builder.CreatePointerBitCastOrAddrSpaceCast( +V, IRFuncTy->getParamType(FirstIRArg)); + else @Anastasia

[PATCH] D69901: [OpenCL] Add integer functions to builtin functions

2019-11-06 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: Anastasia, Nicola, Pierre. Herald added subscribers: cfe-commits, kristina, yaxunl. Herald added a project: clang. This patch adds the integer builtin functions from the OpenCL C specification. Repository: rC Clang https://reviews.llvm.org

[PATCH] D69908: [OpenCL] Add geometric and relational builtin functions

2019-11-06 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: Anastasia, Nicola, Pierre. Herald added subscribers: cfe-commits, kristina, yaxunl. Herald added a reviewer: rengolin. Herald added a project: clang. Adds the geometric and relational builtin functions from the OpenCL C specification. Patch by

[PATCH] D69883: [OpenCL] Add math and common builtin functions

2019-11-07 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6fc73f63660b: [OpenCL] Add math and common builtin functions (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69883/new/ https://reviews.

[PATCH] D69901: [OpenCL] Add integer functions to builtin functions

2019-11-07 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0e70c350943f: [OpenCL] Add integer builtin functions (authored by svenvh). Changed prior to commit: https://reviews.llvm.org/D69901?vs=228079&id=228238#toc Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D69908: [OpenCL] Add geometric and relational builtin functions

2019-11-07 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3d30f2cff7a4: [OpenCL] Add geometric and relational builtin functions (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69908/new/ https:/

[PATCH] D69810: [OpenCL] Fix address space for base method call (PR43145)

2019-11-19 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 230096. svenvh edited the summary of this revision. svenvh added a comment. Rework fix to insert an addrspace conversion node into the AST instead of catching the addrspace cast in CGCall. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69810/new/ htt

[PATCH] D69810: [OpenCL] Fix address space for base method call (PR43145)

2019-11-20 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 230278. svenvh added a comment. Incorporate suggestions from @rjmccall and add a test for the pointer case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69810/new/ https://reviews.llvm.org/D69810 Files: clang/lib/Sema/SemaExpr.cpp clang/test/Co

[PATCH] D69810: [OpenCL] Fix address space for base method call (PR43145)

2019-11-21 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG35388dcbbc4c: [OpenCL] Fix address space for base method call (PR43145) (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69810/new/ https

[PATCH] D70605: [OpenCL] Fix address space for implicit conversion (PR43145)

2019-11-22 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: Anastasia, rjmccall. Herald added a subscriber: yaxunl. Clang was creating a `DerivedToBase` `ImplicitCastExpr` that was also casting between address spaces as part of the second step in the standard conversion sequence. Defer the address spac

[PATCH] D70605: [OpenCL] Fix address space for implicit conversion (PR43145)

2019-11-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. In D70605#1759614 , @rjmccall wrote: > Is there a similar problem with reference parameters? It doesn't seem so, patching the test as follows gives reasonable output. @@ -73,8 +73,10 @@ void pr43145_3(int n) { // Implicit co

[PATCH] D70605: [OpenCL] Fix address space for implicit conversion (PR43145)

2019-11-27 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 231285. svenvh added a comment. Added test for references too. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70605/new/ https://reviews.llvm.org/D70605 Files: clang/lib/Sema/SemaExprCXX.cpp clang/test/CodeGenOpenCLCXX/addrspace-derived-base.cl

[PATCH] D70605: [OpenCL] Fix address space for implicit conversion (PR43145)

2019-11-28 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 231426. svenvh added a comment. Address comment from @rjmccall to preserve original `ToType` pointer type. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70605/new/ https://reviews.llvm.org/D70605 Files: clang/lib/Sema/SemaExprCXX.cpp clang/test/

[PATCH] D70605: [OpenCL] Fix address space for implicit conversion (PR43145)

2019-12-02 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG62364965619b: [OpenCL] Fix address space for implicit conversion (PR43145) (authored by svenvh). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D71015: [OpenCL] Handle address space conversions for constexpr (PR44177)

2019-12-04 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: ebevhan, yaxunl. Herald added a project: clang. The AST for the `constexpr.cl` test contains address space conversion nodes to cast through the implicit generic address space. These caused the evaluator to

[PATCH] D71133: [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387)

2019-12-06 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added a subscriber: yaxunl. Add constexpr evaluation for ExtVectorElementExpr nodes by evaluating the underlying vector expression. Add basic folding too, for the case that Evaluate does not return an LValue. https://revie

[PATCH] D71015: [OpenCL] Handle address space conversions for constexpr (PR44177)

2019-12-09 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf3e6a6123264: [OpenCL] Handle address space conversions for constexpr (PR44177) (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71015/new

[PATCH] D71133: [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387)

2019-12-11 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh marked an inline comment as done. svenvh added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:7057 + +if (Val.isVector()) { + SmallVector Indices; Anastasia wrote: > can Val not be vector at this point? Yes, for example when evaluatin

[PATCH] D71272: [OpenCL] Pretty print __private addr space

2019-12-12 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/D71272/new/ https://reviews.llvm.org/D71272 ___ cfe-commits mailing list cfe-commits@

[PATCH] D71476: [OpenCL] Add builtin function extension handling

2019-12-13 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: Anastasia, Nicola. Herald added subscribers: jfb, yaxunl. Herald added a reviewer: rengolin. Provide a mechanism to attach OpenCL extension information to builtin functions, so that their use can be restricted according to the extension(s) the

[PATCH] D71133: [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387)

2019-12-17 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdf5a905aa8a8: [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387) (authored by svenvh). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D71476: [OpenCL] Add builtin function extension handling

2019-12-17 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh marked 2 inline comments as done. svenvh added inline comments. Comment at: clang/lib/Sema/OpenCLBuiltins.td:51 +// Extension associated to a builtin function. +class FunctionExtension : AbstractExtension<_Ext>; + Anastasia wrote: > Are we planning to add

[PATCH] D71476: [OpenCL] Add builtin function extension handling

2019-12-18 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG308b8b76ceee: [OpenCL] Add builtin function extension handling (authored by svenvh). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D71476?vs=233826&id=234491#toc Repo

[PATCH] D71460: [OpenCL] Fix support for cl_khr_mipmap_image_writes

2020-02-05 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. I have updated the TableGen OpenCL builtin definitions accordingly in 91b3083aecd ("[OpenCL] Fix tblgen support for cl_khr_mipmap_image_writes", 2020-02-05). Repository: rG LLVM Github Monorepo CH

[PATCH] D71460: [OpenCL] Fix support for cl_khr_mipmap_image_writes

2020-01-28 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. In D71460#1844959 , @Anastasia wrote: > Adding @svenvh mainly to check if any fix is needed for the TableGen BIFs too? Yes I believe we should also update `clang/lib/Sema/OpenCLBuiltins.td`. CHANGES SINCE LAST ACTION https://r

[PATCH] D104040: [OpenCL] Add TableGen emitter for OpenCL builtin header

2023-03-09 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4cb843d09942: [OpenCL] Add builtin header TableGen emitter (authored by svenvh). Herald added a subscriber: mgrang. Changed prior to commit: https://reviews.llvm.org/D104040?vs=417678&id=503704#toc Rep

[PATCH] D151339: [OpenCL] Add cl_ext_image_raw10_raw12 extension

2023-05-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: Naghasan, ldrumm, yaxunl. Herald added a project: All. svenvh requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add the defines for the `cl_ext_image_

[PATCH] D143348: [Clang][Doc][OpenCL] Release 16 notes

2023-02-13 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh accepted this revision. svenvh added inline comments. Comment at: clang/docs/ReleaseNotes.rst:840 + * Fixed conditional definition of the depth image and read_write image3d builtins. + * Added ``nounwind`` attribute to all builtin functions. + Anastasia

[PATCH] D28860: [OpenCL] Diagnose write_only image3d when extension is disabled

2017-01-18 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. Prior to OpenCL 2.0, image3d_t can only be used with the write_only access qualifier when the cl_khr_3d_image_writes extension is enabled. Clang did not diagnose write_only image3d arguments when the extension was disabled. Guard uses of write_only image3d in the Ope

[PATCH] D28860: [OpenCL] Diagnose write_only image3d when extension is disabled

2017-01-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 85575. svenvh edited the summary of this revision. svenvh added a comment. Removed the custom sema check and added the extension to the image type in OpenCLImageTypes.def. https://reviews.llvm.org/D28860 Files: include/clang/Basic/OpenCLImageTypes.def l

[PATCH] D28860: [OpenCL] Diagnose write_only image3d when extension is disabled

2017-01-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. In https://reviews.llvm.org/D28860#653662, @yaxunl wrote: > The tests should be added to SemaOpenCL/extension-version.cl SemaOpenCL/extension-version.cl already has a test for the cl_khr_3d_image_writes extension. Comment at: lib/Sema/SemaType.cpp:66

[PATCH] D29718: [libclang] [OpenCL] Expose half type

2017-02-08 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. Expose the half type (fp16) through libclang and the python bindings. It seems CXType_LastBuiltin was not updated in b2ea6d9 ("Enable support for __float128 in Clang", 2016-04-13), so update it now. Add an Index test for OpenCL types; in the future we will add other

[PATCH] D42307: [OpenCL][6.0.0 Release] Release notes for OpenCL in Clang

2018-01-22 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh accepted this revision. svenvh added inline comments. Comment at: docs/ReleaseNotes.rst:233 +- Added private address space explicitly in AST and refactored address space support + with several simplifications and bug fixes (llvm.org/pr33419 and llvm.org/pr33420). +

[PATCH] D32856: [OpenCL] Check that global samplers are const

2017-05-04 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. Patch by Simon Perretta. https://reviews.llvm.org/D32856 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaOpenCL/sampler_t.cl Index: test/SemaOpenCL/sampler_t.cl ===

[PATCH] D32856: [OpenCL] Check that global samplers are const

2017-05-05 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 97932. svenvh added a comment. Improve diagnostic text as suggested. https://reviews.llvm.org/D32856 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaOpenCL/sampler_t.cl Index: test/SemaOpenCL/sampler_t.cl

[PATCH] D32856: [OpenCL] Check that global samplers are const

2017-05-05 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh marked an inline comment as done. svenvh added inline comments. Comment at: lib/Sema/SemaDecl.cpp:6085 + // space qualifier or with the const qualifier. + if (DC->isTranslationUnit() && + !(R.getAddressSpace() == LangAS::opencl_constant || --

[PATCH] D32856: [OpenCL] Check that global samplers are const

2017-05-05 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 97959. svenvh added a comment. Added more tests as suggested. https://reviews.llvm.org/D32856 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaOpenCL/sampler_t.cl Index: test/SemaOpenCL/sampler_t.cl ===

[PATCH] D32856: [OpenCL] Check that global samplers are const

2017-05-08 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL302411: [OpenCL] Check that global samplers are const (authored by svenvh). Changed prior to commit: https://reviews.llvm.org/D32856?vs=97959&id=98143#toc Repository: rL LLVM https://reviews.llvm.or

[PATCH] D33197: [libclang] [OpenCL] Expose more OpenCL CIndex types

2017-05-15 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. Expose pipe, sampler_t, clk_event_t, queue_t, reserve_id_t, and all image types. Update the opencl-types.cl test RUN line such that we can test the OpenCL 2.0 types. Patch by Simon Perretta. https://reviews.llvm.org/D33197 Files: bindings/python

[PATCH] D33197: [libclang] [OpenCL] Expose more OpenCL CIndex types

2017-05-19 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 99574. svenvh added a comment. Adding comments. https://reviews.llvm.org/D33197 Files: bindings/python/clang/cindex.py include/clang-c/Index.h test/Index/opencl-types.cl tools/libclang/CXType.cpp Index: tools/libclang/CXType.cpp

[PATCH] D33197: [libclang] [OpenCL] Expose more OpenCL CIndex types

2017-05-23 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303626: [libclang] [OpenCL] Expose more OpenCL CIndex types (authored by svenvh). Changed prior to commit: https://reviews.llvm.org/D33197?vs=99574&id=99877#toc Repository: rL LLVM https://reviews.l

[PATCH] D117899: [OpenCL] Make read_write images optional for -fdeclare-opencl-builtins

2022-01-21 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. svenvh added a project: clang. Herald added subscribers: Naghasan, ldrumm, yaxunl. svenvh requested review of this revision. Herald added a subscriber: cfe-commits. Ensure any use of a `read_write` image is guarded behind the `__op

[PATCH] D107539: [OpenCL] opencl-c.h: add __opencl_c_images and __opencl_c_read_write_images

2022-01-21 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. Thanks for committing this! The corresponding TableGen changes are in D117899 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107539/new/ https://reviews.llvm.org/D107539

[PATCH] D107769: [OpenCL] Make generic addrspace optional for -fdeclare-opencl-builtins

2022-01-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. In D107769#3265665 , @Anastasia wrote: > The way I understand the spec for OpenCL C 2.0 is that whenever the address > space of the pointer is not listed it means generic has to be used, here is > one example: > https://www.khron

[PATCH] D117899: [OpenCL] Make read_write images optional for -fdeclare-opencl-builtins

2022-01-25 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG91a0b464a853: [OpenCL] Make read_write images optional for -fdeclare-opencl-builtins (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1178

[PATCH] D118158: [OpenCL] opencl-c.h: refactor named addrspace builtins

2022-01-25 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: clang. Herald added subscribers: Naghasan, ldrumm, Anastasia, yaxunl. svenvh requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The named address space overloads of builtins that take a po

[PATCH] D107769: [OpenCL] Make generic addrspace optional for -fdeclare-opencl-builtins

2022-01-27 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 403705. svenvh edited the summary of this revision. svenvh added a comment. Make use of the `__opencl_c_named_address_space_builtins` internal feature added by D118158 . This should avoid affecting OpenCL 2.0. CHANGES SINC

[PATCH] D118158: [OpenCL] opencl-c.h: refactor named addrspace builtins

2022-01-28 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGbfd8210f6f47: [OpenCL] opencl-c.h: refactor named addrspace builtins (authored by svenvh). Changed prior to commit: https://reviews.llvm.org/D1181

[PATCH] D107769: [OpenCL] Make generic addrspace optional for -fdeclare-opencl-builtins

2022-01-31 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:73 #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) +#define __opencl_c_generic_address_space 1 #define cl_khr_subgroup_extended_types 1 Anastasia wr

[PATCH] D107769: [OpenCL] Make generic addrspace optional for -fdeclare-opencl-builtins

2022-01-31 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8e6099291dcb: [OpenCL] Make generic addrspace optional for -fdeclare-opencl-builtins (authored by svenvh). Repository: rG LLVM Github Monorepo CH

[PATCH] D120254: [OpenCL] Align subgroup builtin guards

2022-02-21 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: azabaznov. Herald added subscribers: Naghasan, ldrumm, yaxunl. svenvh requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Until now, subgroup builtins are available with `opencl-c.h` when a

[PATCH] D120254: [OpenCL] Align subgroup builtin guards

2022-02-21 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: clang/lib/Headers/opencl-c-base.h:85 +// Internal feature macro to provide subgroup builtins. +#define __opencl_subgroup_builtins 1 +#endif I'm in doubt whether we could just reuse `__opencl_c_subgroups` for this? Repos

[PATCH] D120262: [OpenCL] Handle TypeExtensions in OpenCLBuiltinFileEmitter

2022-02-21 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. svenvh added a project: clang. Herald added subscribers: Naghasan, ldrumm, yaxunl. svenvh requested review of this revision. Herald added a subscriber: cfe-commits. Until now, any types that had TypeExtensions attached to them were

[PATCH] D120032: [OpenCL] opencl-c.h: use uint/ulong consistently

2022-02-22 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe7e17b30d02d: [OpenCL] opencl-c.h: use uint/ulong consistently (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D120254: [OpenCL] Align subgroup builtin guards

2022-02-23 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh marked an inline comment as done. svenvh added inline comments. Comment at: clang/lib/Headers/opencl-c-base.h:85 +// Internal feature macro to provide subgroup builtins. +#define __opencl_subgroup_builtins 1 +#endif azabaznov wrote: > svenvh wrote: > > I'm

[PATCH] D120254: [OpenCL] Align subgroup builtin guards

2022-02-23 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. svenvh marked an inline comment as done. Closed by commit rGaa9c2d19d9b7: [OpenCL] Align subgroup builtin guards (authored by svenvh). Repository: rG LLVM Github Mon

[PATCH] D120262: [OpenCL] Handle TypeExtensions in OpenCLBuiltinFileEmitter

2022-02-23 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 410822. svenvh added a comment. Use StringRef and extend comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120262/new/ https://reviews.llvm.org/D120262 Files: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp Index: clang/utils/TableGen/Cla

[PATCH] D120262: [OpenCL] Handle TypeExtensions in OpenCLBuiltinFileEmitter

2022-02-23 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh marked 2 inline comments as done. svenvh added inline comments. Comment at: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp:296-298 + // Emit an #if guard for all type extensions required for the given type + // strings. arkangath wrote: > Shouldn't

[PATCH] D120262: [OpenCL] Handle TypeExtensions in OpenCLBuiltinFileEmitter

2022-02-23 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh marked 2 inline comments as done. svenvh added inline comments. Comment at: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp:1183 + SmallVector ExtVec; + TypeExt.split(ExtVec, " "); + for (const auto Ext : ExtVec) { arkangath wrote: > Just

[PATCH] D120254: [OpenCL] Align subgroup builtin guards

2022-02-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. In D120254#3342551 , @dyung wrote: > Hi, our internal release build bots are showing failures in two clang-tidy > tests that I bisected back to your commit, > clang-tidy/checkers/altera-id-dependent-backward-branch.cpp and > cla

[PATCH] D120470: [clang-tidy] Update tests to include opencl-c-base.h

2022-02-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: dyung. Herald added subscribers: Naghasan, ldrumm, xazax.hun, Anastasia, yaxunl. svenvh requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. After D120254

[PATCH] D120254: [OpenCL] Align subgroup builtin guards

2022-02-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. Thanks, I could reproduce the problem with your cmake line. I have uploaded a fix for review in https://reviews.llvm.org/D120470 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120254/new/ https://reviews.llvm.org/D120254 _

[PATCH] D120470: [clang-tidy] Update tests to include opencl-c-base.h

2022-02-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 411106. svenvh edited the summary of this revision. svenvh added reviewers: Anastasia, ffrankies. svenvh added a comment. After a bit of digging I realized we don't need the explicit include at all anymore. CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D120262: [OpenCL] Handle TypeExtensions in OpenCLBuiltinFileEmitter

2022-02-24 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG28cdcf8e3c8e: [OpenCL] Handle TypeExtensions in OpenCLBuiltinFileEmitter (authored by svenvh). Changed prior to commit: https://reviews.llvm.org/D

[PATCH] D120470: [clang-tidy] Update tests to include opencl-c-base.h

2022-02-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. Since this is a simple test update I'll commit this now (before code review), to get affected CI back to green. Please let me know if there are any post-commit concerns. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120470/

[PATCH] D120470: [clang-tidy] Update tests to include opencl-c-base.h

2022-02-24 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 rGba18c360b2f3: [clang-tidy] Remove opencl-c.h inclusion from tests (authored by svenvh). Repository: rG LLVM Github Mono

[PATCH] D101052: [OpenCL] allow pipe as a valid identifier prior to OpenCL 2.0

2021-04-22 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/D101052/new/ https://reviews.llvm.org/D101052 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D100935: [OpenCL] Add missing C++ legacy atomics with generic

2021-04-22 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4138e7bd7692: [OpenCL] Add missing C++ legacy atomics with generic (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

<    1   2   3   4   5   >