[PATCH] D97052: [OpenCL] Prevent adding extension pragma by default

2021-03-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 327400. Anastasia added a comment. Reuploaded with changes from the 1st review round. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97052/new/ https://reviews.llvm.org/D97052 Files: clang/include/clang/Basic/OpenCLExtensions.def clang/include

[PATCH] D97058: [OpenCL] Refactor diagnostic for OpenCL extension/feature

2021-03-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D97058#2587033 , @azabaznov wrote: >> FYI, I would even be ok if we remove the need for enabling non-core > > AFAIU this can be done not for every extension to maintain backward > compatibility. This should not result in any

[PATCH] D97052: [OpenCL] Prevent adding extension pragma by default

2021-03-03 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 rG25ad188bfcdb: [OpenCL] Prevent adding extension pragma by default. (authored by Anastasia). Herald added a project: clang. Repository: rG LLVM Git

[PATCH] D97058: [OpenCL] Refactor diagnostic for OpenCL extension/feature

2021-03-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D97058#2600160 , @azabaznov wrote: > Check 'isEnabled' is now private: it is used only for non-core or > non-optional core features; > creation of implicit type definitions is guarder with extension support > check; minor re

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

2021-03-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. If possible to add a fragment of what is generated it would be great! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97869/new/ https://reviews.llvm.org/D97869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2021-03-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 327915. Anastasia added a comment. Herald added subscribers: kbarton, nemanjai. - Renamed extensions to `cppcl` as it was more popular in RFC - Minimized number of changes in driver setup - Changed file extension in all C++ for OpenCL tests CHANGES SINCE L

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

2021-03-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D96771#2574638 , @awarzynski wrote: > In D96771#2571855 , @Anastasia wrote: > >> This is only the initial patch and for the moment the primary goal is to >> remove the need for the fla

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

2021-03-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > `` > > float test6092_cos(float arg1) { > return cos(arg1); > } > double test6093_cos(double arg1) { > return cos(arg1); > } > half test6094_cos(half arg1) { > return cos(arg1); > } > float2 test6095_cos(float2 arg1) { > return cos(arg1);

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

2021-03-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D89909#2600859 , @aaron.ballman wrote: > Just a few minor nits from me, but I'm mostly wondering: where are we at with > this and are there still substantive changes required? (I looked through the > comments, but there's a

[PATCH] D97058: [OpenCL] Refactor diagnostic for OpenCL extension/feature

2021-03-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/Sema.cpp:364 for (auto &I : Atomic64BitTypes) setOpenCLExtensionForType(I, "cl_khr_int64_base_atomics cl_khr_int64_extended_atomics"); azabaznov wrote: > Anastasia wrote: > >

[PATCH] D97930: [OpenCL] Fix builtins that require multiple extensions

2021-03-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:21 +#if __OPENCL_C_VERSION__ <= CL_VERSION_1_2 +#pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable +#endif You don't seem to be using `write_imagef` for OpenCL ve

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

2021-03-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D97869#2603249 , @azabaznov wrote: > That's awesome! > > I'm thinking of how can you track correctness of generated built-ins > according to spec.  Perhaps you can compare the number of distinct > declarations for each  buil

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

2021-03-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D97869#2603068 , @svenvh wrote: > In D97869#2602943 , @Anastasia wrote: > >> I was just thinking if we could combine the calls into one function to >> minimize the number of lines to p

[PATCH] D98076: [OpenCL][Docs] Release 12.0 notes

2021-03-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: svenvh, azabaznov. Herald added subscribers: ebevhan, yaxunl. Anastasia requested review of this revision. The notes cover functionality in clang added by commits from 16 July to 27th Jan. https://reviews.llvm.org/D98076 Files: clan

[PATCH] D97930: [OpenCL] Fix builtins that require multiple extensions

2021-03-08 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:188 + // expected-error@-2{{no matching function for call to 'write_imagef'}} + // expecte

[PATCH] D98039: [OpenCL] Set calling convention for -fdeclare-opencl-builtins

2021-03-08 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/D98039/new/ https://reviews.llvm.org/D98039 __

[PATCH] D97930: [OpenCL] Fix builtins that require multiple extensions

2021-03-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97930/new/ https://reviews.llvm.org/D97930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D97072: [OpenCL][Docs] Add guidelines for adding new extensions and features

2021-03-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 329602. Anastasia added a comment. Added sentence to elaborate the meaning of "useful". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97072/new/ https://reviews.llvm.org/D97072 Files: clang/docs/OpenCLSupport.rst clang/lib/Driver/Types.cpp I

[PATCH] D97072: [OpenCL][Docs] Add guidelines for adding new extensions and features

2021-03-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 329605. Anastasia added a comment. Fixed patch reupload issue. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97072/new/ https://reviews.llvm.org/D97072 Files: clang/docs/OpenCLSupport.rst Index: clang/docs/OpenCLSupport.rst ==

[PATCH] D98076: [OpenCL][Docs] Release 12.0 notes

2021-03-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 329617. Anastasia added a comment. Added corrections from Sven. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98076/new/ https://reviews.llvm.org/D98076 Files: clang/docs/ReleaseNotes.rst Index: clang/docs/ReleaseNotes.rst ===

[PATCH] D98076: [OpenCL][Docs] Release 12.0 notes

2021-03-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 3 inline comments as done. Anastasia added inline comments. Comment at: clang/docs/ReleaseNotes.rst:214 +- Added ``global_device`` and ``global_host`` address spaces for USM + allocations. + svenvh wrote: > Perhaps one more point to mention: > `

[PATCH] D97058: [OpenCL] Refactor diagnostic for OpenCL extension/feature

2021-03-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D97058#2615926 , @azabaznov wrote: > Corrected some mistakes, added a test for diagnosing undeclared identifiers > when an extension is unsupported. Generally leaving the change as it is as > completely removing pragma may b

[PATCH] D97058: [OpenCL] Refactor diagnostic for OpenCL extension/feature

2021-03-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! Although some further improvements seem to be necessary they can be done separately. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D9

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

2021-03-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Thanks for the comprehensive summary. I don't have many other suggestions in mind but I would like to add a few thoughts. We could always consider writing the tests manually from scratch too. But it doesn't feel like a good cost/benefit trade-off. Regarding 2 and 4 I

[PATCH] D77923: OpenCL: Fix some missing predefined macros

2021-03-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Herald added a subscriber: dexonsmith. FYI there has been a related spec change that makes this functionality optional in the offline compilation: https://github.com/KhronosGroup/OpenCL-Docs/pull/522/files CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77923/n

[PATCH] D98076: [OpenCL][Docs] Release 12.0 notes

2021-03-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/docs/ReleaseNotes.rst:214 +- Added ``global_device`` and ``global_host`` address spaces for USM + allocations. + svenvh wrote: > Anastasia wrote: > > svenvh wrote: > > > Perhaps one more point to mention: > > >

[PATCH] D98076: [OpenCL][Docs] Release 12.0 notes

2021-03-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/docs/ReleaseNotes.rst:214 +- Added ``global_device`` and ``global_host`` address spaces for USM + allocations. + svenvh wrote: > Anastasia wrote: > > svenvh wrote: > > > Anastasia wrote: > > > > svenvh wrote: >

[PATCH] D98076: [OpenCL][Docs] Release 12.0 notes

2021-03-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 329944. Anastasia added a comment. - Added nested pointer item - Elaborated list of removed extensions with no kernel language changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98076/new/ https://reviews.llvm.org/D98076 Files: clang/docs/R

[PATCH] D98076: [OpenCL][Docs] Release 12.0 notes

2021-03-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Sorry for the last-minute change, I have decided to add this too: +- Removed extensions without kernel language changes: + ``cl_khr_select_fprounding_mode``, ``cl_khr_gl_sharing``, ``cl_khr_icd``, + ``cl_khr_gl_event``, ``cl_khr_d3d10_sharing``, ``cl_khr_context

[PATCH] D98076: [OpenCL][Docs] Release 12.0 notes

2021-03-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. @tstellar is it ok if I commit this to the release branch or do you prefer to do it yourself? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98076/new/ https://reviews.llvm.org/D98076 ___ cfe-commits mailing list cf

[PATCH] D97072: [OpenCL][Docs] Add guidelines for adding new extensions and features

2021-03-11 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 rGbafcb4c6841a: [OpenCL][Docs] Add guidelines for new extensions and features. (authored by Anastasia). Herald added a project: clang. Changed prior t

[PATCH] D97058: [OpenCL] Refactor diagnostic for OpenCL extension/feature

2021-03-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D97058#2622681 , @svenvh wrote: > In D97058#2622669 , @thakis wrote: > >> Does it repro if you add `-target arm64-apple-macosx` as arg to c-index-test >> on the RUN line of that test?

[PATCH] D97058: [OpenCL] Refactor diagnostic for OpenCL extension/feature

2021-03-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > (The `fatal error: 'opencl-c-base.h' file not found` bit is printed when the > test passes too, and is unrelated.) I can't reproduce this locally neither with nor without this commit. I think there is something wrong with the way this test runs, this might explai

[PATCH] D97058: [OpenCL] Refactor diagnostic for OpenCL extension/feature

2021-03-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D97058#2622717 , @thakis wrote: > In case it's useful, here's the output of the RUN line on an m1 mac with this > patch locally reverted (where the test passes): > http://pastie.org/p/2F3Y0xUMtH5RP9TVRzG4LI Thanks, this see

[PATCH] D97058: [OpenCL] Refactor diagnostic for OpenCL extension/feature

2021-03-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D97058#2622750 , @Anastasia wrote: > In D97058#2622717 , @thakis wrote: > >> In case it's useful, here's the output of the RUN line on an m1 mac with >> this patch locally reverted (wh

[PATCH] D97058: [OpenCL] Refactor diagnostic for OpenCL extension/feature

2021-03-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I can't find why and how `opencl-c-base.h` is used for the test. But it feels it is adding the random noise to the testing as it is not expected to be used. I don't feel that this commit is affecting the header though, so it is something that might have already been b

[PATCH] D98539: [OpenCL] Set target as spir for c-index-test for OpenCL

2021-03-12 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! I can't see why we would need to tests anything target-specific here anyway, so I think the change is reasonable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D97058: [OpenCL] Refactor diagnostic for OpenCL extension/feature

2021-03-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D97058#2622883 , @azabaznov wrote: > Yes, I was able to reproduce the failure with `-target arm64-apple-macosx` > flag, I provided the fix to set explicit target: > https://reviews.llvm.org/D98539. I have approved it. Thank

[PATCH] D98539: [OpenCL] Set target as spir for c-index-test for OpenCL

2021-03-12 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 rGeed88e91f331: [OpenCL] Use spir target for CIndex tests for OpenCL. (authored by Anastasia). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D98539: [OpenCL] Set target as spir for c-index-test for OpenCL

2021-03-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D98539#2623038 , @thakis wrote: > Can we get this landed asap please? Done! Sorry for the noise. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98539/new/ https://reviews.llvm.

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

2021-03-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D89909#2617194 , @bader wrote: > In D89909#2606180 , @Anastasia wrote: > >> In D89909#2600859 , @aaron.ballman >> wrote: >> >>> Just a few mino

[PATCH] D97058: [OpenCL] Refactor diagnostic for OpenCL extension/feature

2021-03-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D97058#2623160 , @thakis wrote: > I'm going to revert this in 30 minutes. The tree has been red for 12h due to > this then. I have committed the fix mentioned above. Apology for the delay. Repository: rG LLVM Github Mono

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

2021-03-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D89909#2623250 , @aaron.ballman wrote: > In D89909#2623211 , @Anastasia wrote: > >> In D89909#2617194 , @bader wrote: >> >>> @Anastasia, do you

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

2021-03-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > If what you're suggesting is that Clang have a SYCL-specific page that serves > a similar purpose to https://clang.llvm.org/docs/OpenCLSupport.html, then I > agree we should have that (and it should be linked to from > https://clang.llvm.org/docs/index.html the same

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

2021-03-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 330698. Anastasia added a comment. Updated Driver test to check -x option. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96771/new/ https://reviews.llvm.org/D96771 Files: clang/include/clang/Basic/LangStandard.h clang/include/clang/Driver/Typ

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

2021-03-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I had a second thought about the extension name and I realized that the reason why I initially wanted to use `clcpp` is that it aligns better with `clc++` which is used in `-cl-std`. Even though from the RFC the preference was towards `cppcl` it felt like there was no

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

2021-03-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D97869#2617063 , @svenvh wrote: > In D97869#2616772 , @Anastasia wrote: > >> Regarding 2 and 4 I think we should drive towards deprecation of >> `opencl-c.h` as it is a maintenance ove

[PATCH] D92004: [OpenCL] add CL 3.0 optional feature support to opencl-c.h

2021-03-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. FYI the testing of headers functionality is now being discussed in https://reviews.llvm.org/D97869 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92004/new/ https://reviews.llvm.org/D92004 ___

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

2021-11-23 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/D108621/new/ https://reviews.llvm.org/D108621 _

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

2021-11-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Could you please clarify the interface to SPIRV-LLVM-Translator tool, specifically: - Does clang lookup the path to the translator or assume any default path? - Is there any diagnostic provided if the translator not installed/found? - How does clang synchronize with th

[PATCH] D112230: [OpenCL] Add support of __opencl_c_device_enqueue feature macro.

2021-11-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:9554 + +const auto &OpenCLFeaturesMap = +Info.Ctx.getTargetInfo().getSupportedOpenCLOpts(); azabaznov wrote: > azabaznov wrote: > > Anastasia wrote: > > > What test case cover

[PATCH] D112410: [SPIR-V] Add a toolchain for SPIR-V in clang

2021-12-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 391037. Anastasia retitled this revision from "[SPIR-V] Add a tool chain for SPIR-V (incomplete)" to "[SPIR-V] Add a toolchain for SPIR-V in clang". Anastasia edited the summary of this revision. Anastasia added reviewers: svenvh, azabaznov. Anastasia added

[PATCH] D112410: [SPIR-V] Add a toolchain for SPIR-V in clang

2021-12-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 391064. Anastasia added a comment. - Exported full diff. - Added forgotten test cases. - Fixed typo in docs. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112410/new/ https://reviews.llvm.org/D112410 Files: clang/docs/UsersManual.rst clang/in

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

2021-12-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D110618#3152939 , @linjamaki wrote: > In D110618#3148501 , @Anastasia > wrote: > >> Could you please clarify the interface to SPIRV-LLVM-Translator tool, >> specifically: >> >> - Do

[PATCH] D112110: [OpenCL] queue_t and ndrange_t can't be defined in program scope.

2021-12-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Herald added a subscriber: Naghasan. Comment at: clang/test/SemaOpenCL/invalid-types.cl:10 + +typedef image2d_t test; +global test qtt; // expected-error {{the '__global ndrange_t' type cannot be used to declare a program scope variable}} ---

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

2021-12-02 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf4d3cb4ca833: [HIPSPV] Add CUDA->SPIR-V address space mapping (authored by Anastasia). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108621/new/ https://rev

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

2021-12-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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110155/new/ https://reviews.llvm.org/D110155 ___ cfe-commits mailing list

[PATCH] D134445: [PR57881][OpenCL] Fix incorrect diagnostics with templated types in kernel arguments

2022-10-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 470458. Anastasia added a comment. Addressed review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134445/new/ https://reviews.llvm.org/D134445 Files: clang/lib/Sema/SemaDecl.cpp clang/test/SemaOpenCLCXX/invalid-kernel.clcpp Index:

[PATCH] D132473: [Docs][OpenCL][SPIR-V] Release 15 notes for Clang

2022-08-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: svenvh. Herald added subscribers: ebevhan, yaxunl. Herald added a project: All. Anastasia requested review of this revision. Added list of functional changes to release notes. https://reviews.llvm.org/D132473 Files: clang/docs/Relea

[PATCH] D132473: [Docs][OpenCL][SPIR-V] Release 15 notes for Clang

2022-08-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. @svenvh as you made quite a lot of changes in the headers feel free to expand the description if you feel we should document some of those in more detail. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132473/new/ https://reviews.llvm.org/D132473

[PATCH] D132473: [Docs][OpenCL][SPIR-V] Release 15 notes for Clang

2022-08-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 454838. Anastasia added a comment. Minor formatting changes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132473/new/ https://reviews.llvm.org/D132473 Files: clang/docs/ReleaseNotes.rst Index: clang/docs/ReleaseNotes.rst =

[PATCH] D132473: [Docs][OpenCL][SPIR-V] Release 15 notes for Clang

2022-08-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 455139. Anastasia added a comment. - Added clarification about the opaque pointers in SPIR-V. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132473/new/ https://reviews.llvm.org/D132473 Files: clang/docs/ReleaseNotes.rst Index: clang/docs/Rele

[PATCH] D132473: [Docs][OpenCL][SPIR-V] Release 15 notes for Clang

2022-08-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/docs/ReleaseNotes.rst:676 + LLVM backend when generating SPIR-V binary. + Floating Point Support in Clang svenvh wrote: > Should we say anything about opaque pointers? Something like: > > ``` > - Although LL

[PATCH] D134445: [PR57881][OpenCL] Fix incorrect diagnostics with templated types in kernel arguments

2022-09-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: svenvh, olestrohm, rjmccall. Herald added subscribers: Naghasan, ebevhan, yaxunl. Herald added a project: All. Anastasia requested review of this revision. It seems relying on `isStandardLayoutType` helpers is fragile when kernel argumen

[PATCH] D134445: [PR57881][OpenCL] Fix incorrect diagnostics with templated types in kernel arguments

2022-09-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCLCXX/invalid-kernel.clcpp:110 + +// FIXME: Use of templates doesn't work due to lazy instantiation of reference types. +//template I think here should be something like - `the use of templated typ

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

2023-01-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Can you link relevant LLVM reviews or documentation and perhaps add some more details into the description? It's a bit suboptimal though to emit this form of types as SPIR-V specific. Ideally Clang should worry as less as possible about target specifics. So it woul

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

2023-01-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2260 -return CGF.CGM.getNullPointer(cast(ConvertType(DestTy)), - DestTy); +// The type may be a target extension type instead of a pointer type +// (e.g., Op

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

2023-01-11 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! 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_ge

[PATCH] D141449: clang/OpenCL: Fix not setting convergent on block invoke kernels

2023-01-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:12426 // FIXME: Apply default attributes F->addFnAttr(llvm::Attribute::NoUnwind); If `ConstructDefaultFnAttrList` was used it would get convergent correctly... Should we be usi

[PATCH] D134445: [PR57881][OpenCL] Fix incorrect diagnostics with templated types in kernel arguments

2022-11-10 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 rG790cbaafc9e2: [OpenCL] Fix diagnostics with templates in kernel args. (authored by Anastasia). Herald added a subscriber: ldrumm. Herald added a proj

[PATCH] D134445: [PR57881][OpenCL] Fix incorrect diagnostics with templated types in kernel arguments

2022-11-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D134445#3920188 , @rjmccall wrote: > You really can't ask whether a class template pattern is standard layout; > it's not meaningful. Well the templates have to be instantiated with concrete types as kernels can't be calle

[PATCH] D134445: [PR57881][OpenCL] Fix incorrect diagnostics with templated types in kernel arguments

2022-11-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D134445#3920448 , @rjmccall wrote: > In D134445#3920257 , @Anastasia > wrote: > >> In D134445#3920188 , @rjmccall >> wrote: >> >>> You real

[PATCH] D142948: [OpenCL] Disable vector to scalar types coercion for OpenCL

2023-02-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. It doesn't seem to make sense to have a `LangOpt` for this, if anything a new `CodeGenOpt` feels like a better fit. Then you should probably extend existing classify functions to prevent coercion instead of adding yet another function otherwise you will need to handle

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

2023-02-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: svenvh. Herald added subscribers: Naghasan, ebevhan, yaxunl. Herald added a project: All. Anastasia requested review of this revision. Documented major OpenCL features in release 16. https://reviews.llvm.org/D143348 Files: clang/doc

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

2023-01-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D141297#4047148 , @svenvh wrote: > 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 ap

[PATCH] D141700: AMDGPU: Move enqueued block handling into clang

2023-01-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:12440 +/// AMDHSAKernelDescriptor.h) +static llvm::StructType *getKernelDescriptorType(llvm::LLVMContext &C) { + llvm::Type *Int8 = llvm::IntegerType::getInt8Ty(C); Is this AMDGPU targ

[PATCH] D141620: clang/OpenCL: Apply default attributes to enqueued blocks

2023-01-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenOpenCL/cl20-device-side-enqueue-attributes.cl:26 +// SPIR32-SAME: (ptr addrspace(1) align 4 [[A:%.*]], ptr addrspace(1) align 4 [[B:%.*]], i32 [[I:%.*]]) #[[ATTR0:[0-9]+]] !kernel_arg_addr_space !2 !kernel_arg_acces

[PATCH] D127579: [clang][WIP] add option to keep types of ptr args for non-kernel functions in metadata

2022-06-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. The patch seems very straight forward. I wonder though if we should always enable this for SPIR-V w/o adding any flag until the untyped pointers are added to SPIR-V so it will become a target setting controlled instead of a flag? Also is there anything that we don't

[PATCH] D127579: [clang][WIP] add option to keep types of ptr args for non-kernel functions in metadata

2022-06-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D127579#3585537 , @nikic wrote: > In D127579#3585516 , @beanz wrote: > >> @nikic the most important thing you need to know about SPIR-V is that it is >> a virtual ISA based on LLVM I

[PATCH] D127579: [clang][WIP] add option to keep types of ptr args for non-kernel functions in metadata

2022-06-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D127579#3586092 , @nikic wrote: > @Anastasia Thanks, that does sound like a legitimate reason to include the > information. I want to double check though, does linking the modules actually > fail if the functions have signa

[PATCH] D127579: [clang][WIP] add option to keep types of ptr args for non-kernel functions in metadata

2022-06-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D127579#3588651 , @bader wrote: >> The way I understand a bitcast instruction in SPIR-V (`OpBitcast` in >> https://www.khronos.org/registry/SPIR-V/specs/unified1/SPIRV.html#_conversion_instructions) >> is that it can only a

[PATCH] D127579: [clang][WIP] add option to keep types of ptr args for non-kernel functions in metadata

2022-06-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D127579#3590632 , @aeubanks wrote: > If I'm understanding correctly, previously the LLVM pointee type was used to > represent a frontend OpenCL type. An alternative to marking everything with > `elementtype` or adding metad

[PATCH] D127579: [clang][WIP] add option to keep types of ptr args for non-kernel functions in metadata

2022-06-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D127579#3585537 , @nikic wrote: > In D127579#3585516 , @beanz wrote: > >> > > Clang is only permitted to encode pointer type information if that pointer > type has some kind of dire

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

2022-06-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia 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) It would have been nice to print each

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I wonder if accepting type alias with identifier `vector` while parsing would be simpler to implement? Then you could just add those type aliases into the internal header. I assume user code is not allowed to redefine those i.e. it would result in undefined behavior o

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D128012#3591828 , @beanz wrote: > For just the type alias, adding it during parsing would probably work. Where > things get more complicated is we have a whole mess of other data types that > we’ll need to add too eventuall

[PATCH] D127579: [clang][WIP] add option to keep types of ptr args for non-kernel functions in metadata

2022-06-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Btw do we have any issue tracking this failure, I am having a feeling that the translation of special types might be related to https://github.com/llvm/llvm-project/issues/55121? I am not aware at which point libclc is expected to be linked for SPIR-V but if linking h

[PATCH] D127579: [clang][WIP] add option to keep types of ptr args for non-kernel functions in metadata

2022-06-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D127579#3595461 , @nikic wrote: > In D127579#3588626 , @Anastasia > wrote: > >> In D127579#3586092 , @nikic wrote: >> >>> @Anastasia Thanks,

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D128012#3592126 , @beanz wrote: > In D128012#3592098 , @Anastasia > wrote: > >> aha, are you having a lot of these types then? Ok that sounds similar >> problem to OpenCL builtin fu

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

2022-06-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/D127961/new/ https://reviews.llvm.org/D127961 _

[PATCH] D127579: [clang][WIP] add option to keep types of ptr args for non-kernel functions in metadata

2022-06-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D127579#3598308 , @nikic wrote: > In D127579#3598306 , @Anastasia > wrote: > >> In D127579#3595461 , @nikic wrote: >> >>> In D127579#3588626

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

2022-06-24 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/D128434/new/ https://reviews.llvm.org/D128434 _

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

2022-06-24 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/D128436/new/ https://reviews.llvm.org/D128436 _

[PATCH] D125679: [Clang] Added options for integrated backend only used for SPIR-V for now

2022-05-25 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG730dc4e9bce8: [Clang] Added options for integrated backend. (authored by Anastasia). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D125679?vs=429676&id=431938#toc Rep

[PATCH] D125052: [HLSL] Enable vector types for hlsl.

2022-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3490 + if (!Args.hasArg(options::OPT_dxc_no_stdinc)) +CmdArgs.push_back("-finclude-default-header"); } Sharing command line options is great, let's just update the help messa

[PATCH] D124753: [HLSL] Set main as default entry.

2022-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenHLSL/entry_default.hlsl:1 +// RUN: %clang --driver-mode=dxc -Tcs_6_1 -fcgl -Fo - %s | FileCheck %s + Would it make sense to test the opposite i.e. if `-E` is passed in the command line `main` is not

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:54 + +void clang::CodeGen::CGHLSLRuntime::setHLSLFnuctionAttributes( +llvm::Function *F, const FunctionDecl *FD) { I don't think you need `clang::CodeGen::`? C

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenHLSL/entry.hlsl:1 +// RUN: %clang --driver-mode=dxc -Tcs_6_1 -Efoo -fcgl -Fo - %s | FileCheck %s + Is this test here accidental? Comment at: clang/test/CodeGenHLSL/shader_type_attr.

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-05-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2606 + if (getLangOpts().HLSL && TargetDecl) { +if (const FunctionDecl *FD = dyn_cast_or_null(TargetDecl)) + getHLSLRuntime().addHLSLFunctionAttributes(FuncAttrs, RetAttrs, FD); I

[PATCH] D124753: [HLSL] Set main as default entry.

2022-05-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. From the current change it seems to me that what you need to be testing is a just that the frontend options are being passed correctly? This should then be a driver test with `-###` checking for the options to be set for the frontend invocation... Repository: rG L

<    7   8   9   10   11   12   13   14   15   16   >