[PATCH] D101843: [OpenCL] Add clang extension for bitfields

2021-05-24 Thread Anastasia Stulova 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 rG237c6924bd46: [OpenCL] Add clang extension for bit-fields. (authored by Anastasia). Herald added subscribers: foad, ldrumm. Herald added a project: c

[PATCH] D102850: [C++4OpenCL] Fix overloading resolution of addrspace constructors

2021-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:9870 + if (S.getLangOpts().OpenCL) { +if (const auto *CD1 = dyn_cast_or_null(Cand1.Function)) { olestrohm wrote: > Anastasia wrote: > > olestrohm wrote: > > > Anastasia wrote: >

[PATCH] D103097: Add DWARF address spaces mapping for SPIR

2021-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenOpenCL/spir-debug-info-pointer-address-space.cl:22 +// CHECK-DAG: distinct !DIGlobalVariable(name: "FileVar5", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: ![[DWARF_ADDRESS_SPACE_GLOBAL]], isLocal:

[PATCH] D97869: [OpenCL][Draft] Add OpenCL builtin test generator

2021-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I think this is a very good starting point for the testing of built-in functions. Btw should we now remove '[Draft]' from the title? Comment at: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp:242 + // functions. + void Emit(); + ---

[PATCH] D103175: [C++4OpenCL] Fix ICE with invalid use of half

2021-05-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks Yeah I think this is the only case where `DefaultLvalueConversion` exits with an error at present. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D103241: [OpenCL] Add memory_scope_all_devices

2021-05-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/include/clang/Basic/OpenCLExtensions.def:113 OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_order_seq_cst, false, 300, OCL_C_30) +OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_scope_all_devices, false, 300, OCL_C_30) OPENCL_OPTI

[PATCH] D103241: [OpenCL] Add memory_scope_all_devices

2021-05-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/include/clang/Basic/OpenCLExtensions.def:113 OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_order_seq_cst, false, 300, OCL_C_30) +OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_scope_all_devices, false, 300, OCL_C_30) OPENCL_OPTI

[PATCH] D103401: [OpenCL] Add support of __opencl_c_generic_address_space feature macro

2021-06-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Basic/TargetInfo.cpp:405 + const auto &OpenCLFeaturesMap = getSupportedOpenCLOpts(); + Opts.OpenCLGenericAddressSpace = hasFeatureEnabled( + OpenCLFeaturesMap, "__opencl_c_generic_address_space"); -

[PATCH] D103241: [OpenCL] Add memory_scope_all_devices

2021-06-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/include/clang/Basic/OpenCLExtensions.def:113 OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_order_seq_cst, false, 300, OCL_C_30) +OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_scope_all_devices, false, 300, OCL_C_30) OPENCL_OPTI

[PATCH] D103401: [OpenCL] Add support of __opencl_c_generic_address_space feature macro

2021-06-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Basic/TargetInfo.cpp:405 + const auto &OpenCLFeaturesMap = getSupportedOpenCLOpts(); + Opts.OpenCLGenericAddressSpace = hasFeatureEnabled( + OpenCLFeaturesMap, "__opencl_c_generic_address_space"); -

[PATCH] D103097: Add DWARF address spaces mapping for SPIR

2021-06-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103097/new/ https://reviews.llvm.org/D103097 ___ cfe-commits mailing lis

[PATCH] D102850: [C++4OpenCL] Fix overloading resolution of addrspace constructors

2021-06-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:9870 + if (S.getLangOpts().OpenCL) { +if (const auto *CD1 = dyn_cast_or_null(Cand1.Function)) { olestrohm wrote: > Anastasia wrote: > > olestrohm wrote: > > > Anastasia wrote: >

[PATCH] D92277: [OpenCL] Refactor of targets OpenCL option settings

2021-01-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. Cool. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92277/new/ https://reviews.llvm.org/D92277 ___ cfe-commits mailing list cfe-commit

[PATCH] D95038: [OpenCL][Docs] Describe tablegen BIFs declaration

2021-01-25 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8fdd5784f0d3: [OpenCL][Docs] Describe tablegen BIFs declarations. (authored by Anastasia). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D95038?vs=318208&id=318938#toc

[PATCH] D95442: [OpenCL] Add diagnostics for references to functions

2021-01-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: mantognini. Herald added subscribers: ebevhan, yaxunl. Anastasia requested review of this revision. References to functions are less permissive than pointers to functions and therefore some use cases could be allowed for example: - For

[PATCH] D95442: [OpenCL] Add diagnostics for references to functions

2021-01-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCLCXX/references.cl:24 +void templ() { + // FIXME: We miss to diagnose the reference to function. + T loc; //expected-error{{declaration of reference variable 'loc' requires an initializer}} I hav

[PATCH] D95442: [OpenCL] Add diagnostics for references to functions

2021-01-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 319369. Anastasia added a comment. Improved diagnostics to cover more cases. NOTE that this now also contains similar improvements for the pointers to member functions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95442/new/ https://reviews.llv

[PATCH] D95442: [OpenCL] Add diagnostics for references to functions

2021-01-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCLCXX/references.cl:29 +void foo(); +void test(void (&par)()) { + void (&loc)(); Anastasia wrote: > oops, I thought this was covered in my patch. I will see if there is a quick > fix and if not I w

[PATCH] D95061: [OpenCL][Docs] Moved information about internals from UsersManual into OpenCLSupport

2021-01-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/docs/UsersManual.rst:2951 address space map can be added using the :ref:`-ffake-address-space-map ` flag. svenvh wrote: > Is this a dead reference now that you moved it to a different file? It is moved to

[PATCH] D95061: [OpenCL][Docs] Moved information about internals from UsersManual into OpenCLSupport

2021-01-27 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd7cc3a083fce: [OpenCL][Docs] Moved info from UsersManual into OpenCLSupport. (authored by Anastasia). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D95061?vs=317943&id

[PATCH] D95442: [OpenCL] Add diagnostics for references to functions

2021-01-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCLCXX/members.cl:17 - -template struct remove_reference { typedef T type; }; -template struct remove_reference { typedef T type; }; mantognini wrote: > I wonder, do we lose coverage by removing the

[PATCH] D95608: [OpenCL][PR48896] Fix address space in binding of initializer lists to references

2021-01-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 319869. Anastasia retitled this revision from "[OpenCL][PR48896] Fix address space when binding vector literals to references" to "[OpenCL][PR48896] Fix address space in binding of initializer lists to references". Anastasia edited the summary of this revis

[PATCH] D58634: [PR40778] Generate address space conversion when binding reference to a temporary value in different address space

2021-01-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaInit.cpp:4806-4808 + if ((RefRelationship == Sema::Ref_Related && + (T1CVRQuals | T2CVRQuals) != T1CVRQuals) || + !T1Quals.isAddressSpaceSupersetOf(T2Quals)) { ebevhan wrote: > Sorry for the re

[PATCH] D95608: [OpenCL][PR48896] Fix address space in binding of initializer lists to references

2021-02-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 320447. Anastasia added a comment. Added address space compatibility check and improved testing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95608/new/ https://reviews.llvm.org/D95608 Files: clang/lib/Sema/SemaInit.cpp clang/test/CodeGenOpe

[PATCH] D95608: [OpenCL][PR48896] Fix address space in binding of initializer lists to references

2021-02-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:4297 + ? S.Context.getQualifiedType(T1, T1Quals.withoutAddressSpace()) + : cv1T1; // Not reference-related. Create a temporary and bind to tha

[PATCH] D95624: [OpenCL][PR48896] Fix default address space in template argument deduction

2021-02-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 320484. Anastasia retitled this revision from "[OpenCL][PR48896] Add default address space in template argument deduction only if missing" to "[OpenCL][PR48896] Fix default address space in template argument deduction". Anastasia edited the summary of this

[PATCH] D95616: [OpenCL] Change extension handling for -fdeclare-opencl-builtins

2021-02-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95616/new/ https://reviews.llvm.org/D95616 __

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-02-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D89909#2496269 , @bader wrote: > In D89909#2448443 , @Anastasia wrote: > >> If you prefer to continue this route then you should just document your >> dialect sematic somewhere publicl

[PATCH] D95523: [OpenCL] Add cl_khr_subgroup_ballot to TableGen BIFs

2021-02-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:35 +// Enable extensions that are enabled in opencl-c-base.h. +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) +#define cl_khr_subgroup_ballot 1 No

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-02-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D89909#2534790 , @bader wrote: >> Regarding SYCLDevice and SYCLAddrSpaceMap I am still not very convinced >> about the flow. Have you had any design discussion regarding this already >> that you could point to? > > We discus

[PATCH] D95776: [OpenCL] Add macro definitions of OpenCL C 3.0 features

2021-02-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a subscriber: svenvh. Anastasia added inline comments. Comment at: clang/lib/Basic/Targets.cpp:743 + // Assume compiling for FULL profile + Builder.defineMacro("__opencl_c_int64"); } Btw we could add the other feature macros for earlier version

[PATCH] D95778: [OpenCL] Introduce new language options for OpenCL keywords.

2021-02-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > LGTM, but perhaps you can add a test that has each keyword disabled? FYI we currently already test that `pipe` and `generic` are valid for OpenCL 2.0 and invalid for OpenCL < 2.0. Or do you mean different kind of tests? In OpenCL 3.0 we will have to set the new `Lan

[PATCH] D95523: [OpenCL] Add cl_khr_subgroup_ballot to TableGen BIFs

2021-02-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:141 +kernel void extended_subgroup(global uint4 *out) { + out[0] = get_sub_group_eq_mask();

[PATCH] D95608: [OpenCL][PR48896] Fix address space in binding of initializer lists to references

2021-02-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 320751. Anastasia marked an inline comment as done. Anastasia added a comment. Fixed value kind. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95608/new/ https://reviews.llvm.org/D95608 Files: clang/lib/Sema/SemaInit.cpp clang/test/CodeGenOpe

[PATCH] D95608: [OpenCL][PR48896] Fix address space in binding of initializer lists to references

2021-02-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:4308 + if (T1Quals.hasAddressSpace()) +Sequence.AddQualificationConversionStep(cv1T1, VK_XValue); +} else rjmccall wrote: > Anastasia wrote: > > rjmccall wrote: > > > This s

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-02-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D89909#2536331 , @bader wrote: > In D89909#2536157 , @Anastasia wrote: > >> In D89909#2534790 , @bader wrote: >> Regarding SYCLDevice and S

[PATCH] D95442: [OpenCL] Add diagnostics for references to functions

2021-02-02 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5bbf39704c2b: [OpenCL] Add diagnostics for references to functions (authored by Anastasia). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D78979: OpenCL: Include builtin header by default

2021-02-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Herald added a reviewer: jansvoboda11. @arsenm I would like to see if we can finalize this patch soon. Do you think you will have a capacity for this in the next weeks? Otherwise I would be happy to help too. It looks in a good shape, we just need to decide if we go a

[PATCH] D95523: [OpenCL] Add cl_khr_subgroup_ballot to TableGen BIFs

2021-02-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:141 +kernel void extended_subgroup(global uint4 *out) { + out[0] = get_sub_group_eq_mask(); +#if __OPENCL_C_VERSION__ < CL_VERSION_2_0 && !defined(__OPENCL_CPP_VERSION__) -

[PATCH] D95776: [OpenCL] Add macro definitions of OpenCL C 3.0 features

2021-02-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Basic/Targets.cpp:743 + // Assume compiling for FULL profile + Builder.defineMacro("__opencl_c_int64"); } azabaznov wrote: > Anastasia wrote: > > Btw we could add the other feature macros for earlier versi

[PATCH] D95778: [OpenCL] Introduce new language options for OpenCL keywords.

2021-02-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D95778#2536598 , @azabaznov wrote: > In D95778#2536266 , @Anastasia wrote: > >>> LGTM, but perhaps you can add a test that has each keyword disabled? >> >> FYI we currently already test

[PATCH] D95886: [OpenCL][Docs] Link page explaining tooling for offline compilation

2021-02-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: svenvh. Herald added subscribers: ebevhan, yaxunl. Anastasia requested review of this revision. https://reviews.llvm.org/D95886 Files: clang/docs/UsersManual.rst Index: clang/docs/UsersManual.rst

[PATCH] D95608: [OpenCL][PR48896] Fix address space in binding of initializer lists to references

2021-02-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D95608#2537316 , @rjmccall wrote: > Thanks, LGTM. > > I think idiomatically we normally just use `(void)` instead of spelling it > out with `static_cast`, since there's only one possible meaning for a cast to > `void`. I do

[PATCH] D95608: [OpenCL][PR48896] Fix address space in binding of initializer lists to references

2021-02-03 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe635feb15a91: [OpenCL] Fix address space in binding of initializer lists to referencs (authored by Anastasia). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D95608?vs=

[PATCH] D78979: OpenCL: Include builtin header by default

2021-02-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D78979#2536661 , @arsenm wrote: > In D78979#2536590 , @Anastasia wrote: > >> @arsenm I would like to see if we can finalize this patch soon. Do you think >> you will have a capacity fo

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-02-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > Sorry, I forgot to mentioned that this change was also discussed in the > mailing list: > http://clang-developers.42468.n3.nabble.com/RFC-Re-use-OpenCL-address-space-attributes-for-SYCL-td4068754.html. > There are no objections from the community. I remember asking

[PATCH] D95778: [OpenCL] Introduce new language options for OpenCL keywords.

2021-02-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95778/new/ https://reviews.llvm.org/D95778 ___ cfe-commits mailing list cfe-commits

[PATCH] D95886: [OpenCL][Docs] Link page explaining tooling for offline compilation

2021-02-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 321369. Anastasia added a comment. Addressed Sven's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95886/new/ https://reviews.llvm.org/D95886 Files: clang/docs/UsersManual.rst Index: clang/docs/UsersManual.rst ===

[PATCH] D95776: [OpenCL] Add macro definitions of OpenCL C 3.0 features

2021-02-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCL/features.cl:1 +// RUN: %clang_cc1 -triple spir-unknown-unknown -finclude-default-header %s -E -dM -o - -x cl -cl-std=CL2.0 -cl-ext=-all \ +// RUN: | FileCheck -match-full-lines %s --check-prefix=FEATURES -

[PATCH] D95776: [OpenCL] Add macro definitions of OpenCL C 3.0 features

2021-02-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCL/features.cl:1 +// RUN: %clang_cc1 -triple spir-unknown-unknown -finclude-default-header %s -E -dM -o - -x cl -cl-std=CL2.0 -cl-ext=-all \ +// RUN: | FileCheck -match-full-lines %s --check-prefix=FEATURES -

[PATCH] D95624: [OpenCL][PR48896] Fix default address space in template argument deduction

2021-02-04 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0c65993be186: [OpenCL] Fix default address space in template argument deduction. (authored by Anastasia). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D95886: [OpenCL][Docs] Link page explaining tooling for offline compilation

2021-02-04 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0fb4341519ef: [OpenCL][Docs] Link page explaining tooling for offline compilation. (authored by Anastasia). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D95776: [OpenCL] Add macro definitions of OpenCL C 3.0 features

2021-02-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95776/new/ https://reviews.llvm.org/D95776 __

[PATCH] D96043: Treat opencl_unroll_hint subject errors as semantic rather than parse errors

2021-02-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks for fixing this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96043/new/ https://reviews.llvm.org/D96043 __

[PATCH] D96050: [OpenCL] Do not enforce ASTContext for OCL2Qual

2021-02-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. Cool! Makes sense, LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96050/new/ https://reviews.llvm.org/D96050 ___

[PATCH] D96051: [OpenCL] Support enum and typedef args in TableGen BIFs

2021-02-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:38 +typedef uint cl_mem_fence_flags; +#define CLK_GLOBAL_MEM_FENCE 0x02 + Should we add this conditionally if the base header is not included? In the subsequent patc

[PATCH] D95951: [OpenCL] Add cl_khr_subgroup_non_uniform_arithmetic to TableGen BIFs

2021-02-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks Comment at: clang/lib/Sema/OpenCLBuiltins.td:1529 + foreach name = ["reduce_", "scan_exclusive_", "scan_inclusive_"] in { +foreach op = ["add", "min",

[PATCH] D96151: [OpenCL] Fix pipe type printing in arg info metadata

2021-02-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: svenvh, mantognini. Herald added subscribers: ebevhan, yaxunl. Anastasia requested review of this revision. Pipe element type spelling for arg info matadata should follow the same behavior as normal type spelling. We should not return th

[PATCH] D96161: [OpenCL] Fix printing of types with signed prefix in arg info metadata

2021-02-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: svenvh, mantognini. Herald added subscribers: ebevhan, yaxunl. Anastasia requested review of this revision. OpenCL spec doesn't seem to describe the behavior correctly for type printing in **GetKernelArgInfo** (https://www.khronos.org/r

[PATCH] D109874: [OpenCL] Defines helper function for OpenCL default address space

2021-09-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:1366 + /// Returns default address space based on OpenCL version and enabled features + inline LangAS getDefaultOpenCLAddrSpace() { +return LangOpts.OpenCLGenericAddressSpace ? LangAS::opencl

[PATCH] D109818: [HIPSPV] Convert HIP kernels to SPIR-V kernels

2021-09-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:10221 +ABIArgInfo SPIRABIInfo::classifyKernelArgumentType(QualType Ty) const { + if (getContext().getLangOpts().HIP && getTarget().getTriple().isSPIRV()) { +// Coerce pointer arguments with default

[PATCH] D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping

2021-09-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Basic/Targets/SPIR.h:59 +// translation). This mapping is enabled when the language mode is HIP. +1, // cuda_device +// cuda_constant pointer can be casted to default/"flat" pointer, but in linjam

[PATCH] D109874: [OpenCL] Defines helper function for OpenCL default address space

2021-09-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D109874#3011792 , @Topotuna wrote: > Both comments addressed. Personally, I would shuffle words around to rename > helper function as `getDefaultOpenCLPointeeAddrSpace` or > `getOpenCLDefaultPointeeAddrSpace`. Although I am

[PATCH] D109874: [OpenCL] Defines helper function for OpenCL default address space

2021-09-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks Feel free to adjust the naming scheme either in the same commit or separately. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109874/new/ https://reviews.llvm.org/D

[PATCH] D108359: [clang][NFC] Fix needless double-parenthisation

2021-09-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108359/new/ https://reviews.llvm.org/D108359 _

[PATCH] D110155: [OpenCL] Allow optional __generic in __remove_address_space utility

2021-09-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110155/new/ https://reviews.llvm.org/D110155 _

[PATCH] D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping

2021-09-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Basic/Targets/SPIR.h:59 +// translation). This mapping is enabled when the language mode is HIP. +1, // cuda_device +// cuda_constant pointer can be casted to default/"flat" pointer, but in bader

[PATCH] D109818: [HIPSPV] Convert HIP kernels to SPIR-V kernels

2021-09-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:10221 +ABIArgInfo SPIRABIInfo::classifyKernelArgumentType(QualType Ty) const { + if (getContext().getLangOpts().HIP && getTarget().getTriple().isSPIRV()) { +// Coerce pointer arguments with default

[PATCH] D110184: [OpenCL] Constructor address space test adjusted for C++ for OpenCL 2021

2021-09-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110184/new/ https://reviews.llvm.org/D110184 _

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. It would be good to get closure on this asap. @bader We had related discussions on the other reviews about the approach in this patch. If you have any concerns/suggestions can you please notify asap... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D110618: [HIPSPV][2/4] Add HIPSPV tool chain

2021-09-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Considering that SPIR-V translation step is also required for other languages would it make sense to add `llvm-spirv` as a common tool like for example C/C++ linkers and create a bit of common infrastructure? It might be something we can do as a separate step too but

[PATCH] D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping

2021-10-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Basic/Targets/SPIR.h:59 +// translation). This mapping is enabled when the language mode is HIP. +1, // cuda_device +// cuda_constant pointer can be casted to default/"flat" pointer, but in bader

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-10-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D109144#3042014 , @bader wrote: > In D109144#3032865 , @Anastasia > wrote: > >> It would be good to get closure on this asap. >> >> @bader We had related discussions on the other rev

[PATCH] D96161: [OpenCL] Fix printing of types with signed prefix in arg info metadata

2021-02-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 322087. Anastasia added a comment. Use char instead of int in the test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96161/new/ https://reviews.llvm.org/D96161 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/test/CodeGenOpenCL/kernel-arg-in

[PATCH] D96151: [OpenCL] Fix pipe type printing in arg info metadata

2021-02-08 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGecc8ac3f081b: [OpenCL] Fix pipe type printing in arg info metadata (authored by Anastasia). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D96151?vs=321799&id=322114#to

[PATCH] D96161: [OpenCL] Fix printing of types with signed prefix in arg info metadata

2021-02-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1500 StringRef typeNameRef = typeName; // Turn "unsigned type" to "utype" if (Ty.isCanonical()) { stuart wrote:

[PATCH] D96161: [OpenCL] Fix printing of types with signed prefix in arg info metadata

2021-02-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 322330. Anastasia added a comment. Renamed variables in CHECK statements CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96161/new/ https://reviews.llvm.org/D96161 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/test/CodeGenOpenCL/kernel-arg-i

[PATCH] D96161: [OpenCL] Fix printing of types with signed prefix in arg info metadata

2021-02-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenOpenCL/kernel-arg-info.cl:112-118 +// CHECK: !kernel_arg_addr_space ![[SINT_AS_QUAL:[0-9]+]] +// CHECK: !kernel_arg_access_qual ![[MD42]] +// CHECK: !kernel_arg_type ![[SINT_TY:[0-9]+]] +// CHECK: !kernel_arg_base_typ

[PATCH] D96161: [OpenCL] Fix printing of types with signed prefix in arg info metadata

2021-02-09 Thread Anastasia Stulova 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 rG79b222c39f0e: [OpenCL] Fix types with signed prefix in arginfo metadata. (authored by Anastasia). Herald added a project:

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. @svenvh We haven't looked into address spaces in details when adding this. I wonder what behavior would make sense for new/delete? Do we plan to allow new/delete in named address spaces or only in generic? It might be more helpful to allow named address spaces since g

[PATCH] D96161: [OpenCL] Fix printing of types with signed prefix in arg info metadata

2021-02-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. The clarification to the spec: https://github.com/KhronosGroup/OpenCL-Docs/pull/558 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96161/new/ https://reviews.llvm.org/D96161 __

[PATCH] D96051: [OpenCL] Support enum and typedef args in TableGen BIFs

2021-02-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. The change looks good, could we test the diagnostic that is added? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96051/new/ https://reviews.llvm.org/D96051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D96279: [OpenCL] Add cl_khr_subgroup_extended_types to TableGen BIFs

2021-02-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96279/new/ https://reviews.llvm.org/D96279 ___

[PATCH] D96150: [OpenCL][Docs] Describe internals of TableGen BIFs

2021-02-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. Ok, this looks like a good start. Later we can add a bit more information/guidance on how to add new function specifically how to specify parameter or return types, overloads, and attri

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > Do I understand correctly that this means void pointer is not necessarily > points to generic AS? This is an internal Clang pointer type that is used in very few places as a pointer to anything, so it makes sense to add generic. I agree this change actually fixes a

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. PS, I will create a PR to follow up on the issue I have discovered. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96178/new/ https://reviews.llvm.org/D96178 ___ cfe-commits mai

[PATCH] D96515: [OpenCL] Add builtin declarations by default.

2021-02-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: svenvh, arsenm. Herald added subscribers: dang, ebevhan, yaxunl. Herald added a reviewer: jansvoboda11. Anastasia requested review of this revision. Herald added a subscriber: wdng. See original RFC: https://lists.llvm.org/pipermail/cfe-

[PATCH] D78979: OpenCL: Include builtin header by default

2021-02-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. The new review: https://reviews.llvm.org/D96515 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78979/new/ https://reviews.llvm.org/D78979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D96524: [OpenCL] Add support of OpenCL C 3.0 __opencl_c_fp64

2021-02-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9899 def err_opencl_requires_extension : Error< - "use of %select{type|declaration}0 %1 requires %2 extension to be enabled">; + "use of %select{type|declaration}0 %1 requires %2 %se

[PATCH] D96051: [OpenCL] Support enum and typedef args in TableGen BIFs

2021-02-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:27 + // expected-error@-3 0+{{no matching function for call to 'barrier'}} + // expected-error@* {{typedef type cl_mem_fence_flags not found; include the base header with -finclude-d

[PATCH] D96515: [OpenCL] Add builtin declarations by default.

2021-02-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 323362. Anastasia added a comment. Changed command line option text. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96515/new/ https://reviews.llvm.org/D96515 Files: clang/include/clang/Driver/Options.td clang/include/clang/Driver/Types.h cl

[PATCH] D96515: [OpenCL] Add builtin declarations by default.

2021-02-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D96515#2559424 , @svenvh wrote: > It probably makes sense to update `clang/docs/UsersManual.rst` as part of > this change. In particular the following sentence is no longer true after > this patch: "By default the OpenCL he

[PATCH] D96616: [OpenCL][Docs] Change documentation for the OpenCL standard headers

2021-02-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: svenvh. Herald added subscribers: ebevhan, yaxunl. Anastasia requested review of this revision. After updating the user interface (https://reviews.llvm.org/D96515), make sure the doc reflects the change. https://reviews.llvm.org/D9661

[PATCH] D96515: [OpenCL] Add builtin declarations by default.

2021-02-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D96515#2560280 , @Anastasia wrote: > In D96515#2559424 , @svenvh wrote: > >> It probably makes sense to update `clang/docs/UsersManual.rst` as part of >> this change. In particular th

[PATCH] D96588: [OpenCL] Remove FIXME in getOpenCLFeatureDefines

2021-02-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > The suggestion in D92277 was to move > OpenCLOptions into LanguageOptions, but > this is not viable. Sema's LangOpts is immutable, and embedding > OpenCLOptions into LangOpts would make OpenCLOptions immutable too. > This is incomp

[PATCH] D96524: [OpenCL] Add support of OpenCL C 3.0 __opencl_c_fp64

2021-02-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Basic/OpenCLOptions.cpp:24 + auto CLVer = LO.OpenCLCPlusPlus ? 200 : LO.OpenCLVersion; + return CLVer >= 300 ? isEnabled("__opencl_c_fp64") : isEnabled("cl_khr_fp64"); +} azabaznov wrote: > Anastasia wrote

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96178/new/ https://reviews.llvm.org/D96178 __

[PATCH] D96178: [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode

2021-02-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. FYI I have created `PR49191` for the issues with address spaces I have highlighted earlier. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96178/new/ https://reviews.llvm.org/D96178 __

[PATCH] D96051: [OpenCL] Support enum and typedef args in TableGen BIFs

2021-02-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:27 + // expected-error@-3 0+{{no matching function for call to 'barrier'}} + // expected-e

[PATCH] D96771: [OpenCL] Add distinct file extension for C++ for OpenCL

2021-02-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: svenvh, mantognini. Herald added subscribers: dexonsmith, ebevhan, yaxunl. Herald added a reviewer: jansvoboda11. Anastasia requested review of this revision. Files compiled with C++ for OpenCL can have a distinct file extension - `clcpp

<    5   6   7   8   9   10   11   12   13   14   >