[PATCH] D108392: [OpenCL] Fix parsing of opencl-c.h in CL 3.0 with device-scope atomics enabled

2021-11-04 Thread Kévin Petit via Phabricator via cfe-commits
kpet added inline comments. Comment at: clang/lib/Headers/opencl-c.h:13381 uint __ovld atomic_fetch_xor(volatile __global atomic_uint *object, uint operand); -uint __ovld atomic_fetch_xor(volatile __local atomic_uint *object, uint operand);i int __ovld

[PATCH] D108392: [OpenCL] Fix parsing of opencl-c.h in CL 3.0 with device-scope atomics enabled

2021-08-19 Thread Kévin Petit via Phabricator via cfe-commits
kpet created this revision. kpet added a reviewer: Anastasia. Herald added subscribers: ldrumm, jfb, kristof.beyls, yaxunl. kpet requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Also declare and test the __opencl_c_atomic_scope_device and

[PATCH] D99425: [OpenCL] Fix parsing of opencl-c.h in CL 3.0

2021-03-30 Thread Kévin Petit via Phabricator via cfe-commits
kpet closed this revision. kpet added a comment. Committed as https://github.com/llvm/llvm-project/commit/9d25ce743a95a9ad03c0a4b3a705f85c2de52398. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99425/new/ https://reviews.llvm.org/D99425

[PATCH] D99425: [OpenCL] Fix parsing of opencl-c.h in CL 3.0

2021-03-30 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. Thanks! I'll commit the change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99425/new/ https://reviews.llvm.org/D99425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D99425: [OpenCL] Fix parsing of opencl-c.h in CL 3.0

2021-03-30 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. @azabaznov Without this change, `opencl-c.h` cannot be parsed with `-cl-std=CL3.0` as the `write_only image3d_t` type is not enabled. The type is currently enabled via `cl_khr_3d_image_writes`. See

[PATCH] D99425: [OpenCL] Fix parsing of opencl-c.h in CL 3.0

2021-03-28 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. Thanks! I'll wait for a couple of days before committing then. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99425/new/ https://reviews.llvm.org/D99425 ___ cfe-commits mailing list

[PATCH] D99425: [OpenCL] Fix parsing of opencl-c.h in CL 3.0

2021-03-26 Thread Kévin Petit via Phabricator via cfe-commits
kpet created this revision. kpet added a reviewer: Anastasia. kpet added a project: clang. Herald added subscribers: ldrumm, kristof.beyls, yaxunl. kpet requested review of this revision. Herald added a subscriber: cfe-commits. Ensure that the cl_khr_3d_image_writes pragma is enabled by making

[PATCH] D68388: [PR41008][OpenCL] Add OpenCL C compatibility mode to C++ for OpenCL

2019-11-22 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. Thanks for the feedback. > I think we should use -fpermissive rather than adding similar flag to Clang. Could you point me at a use of `-fpermissive` for a similar case? Also it seems `-fpermissive` is not mentioned in the Clang manual or the help text. Am I missing

[PATCH] D68388: [PR41008][OpenCL] Add OpenCL C compatibility mode to C++ for OpenCL

2019-11-22 Thread Kévin Petit via Phabricator via cfe-commits
kpet updated this revision to Diff 230620. kpet retitled this revision from "[PR41008][OpenCL] Support restrict keyword in C++ mode" to "[PR41008][OpenCL] Add OpenCL C compatibility mode to C++ for OpenCL". kpet edited the summary of this revision. kpet added a comment. As discussed offline,

[PATCH] D68388: [PR41008][OpenCL] Support restrict keyword in C++ mode

2019-10-04 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. Something I should probably have explained in the commit message is that the functionality provided by `restrict` is already present in C++, where it is already exposed using different keywords. If you look at `clang/include/clang/Basic/TokenKinds.def`, there are

[PATCH] D68388: [PR41008][OpenCL] Support restrict keyword in C++ mode

2019-10-03 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. There doesn't seem to be a test for this (enabling `restrict` in C++ doesn't make any existing test fail). I couldn't find any test checking that OpenCL or C++/OpenCL keywords generally aren't enabled in C or C++. Doing this generically would essentially equate to

[PATCH] D68388: [PR41008][OpenCL] Support restrict keyword in C++ mode

2019-10-03 Thread Kévin Petit via Phabricator via cfe-commits
kpet created this revision. kpet added a reviewer: Anastasia. Herald added subscribers: cfe-commits, kristof.beyls, yaxunl. Herald added a project: clang. Just enable it in C++ for OpenCL but not in C++. Signed-off-by: Kevin Petit Repository: rC Clang https://reviews.llvm.org/D68388

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

2019-07-23 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. Hmm, maybe we need to make sure that one of the tests is using a C++ feature and building with `CLC++`. This would have caught the mistake. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65102/new/ https://reviews.llvm.org/D65102

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

2019-07-23 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. Thanks for doing this! Comment at: include/clang/Frontend/LangStandards.def:177 LANGSTANDARD_ALIAS_DEPR(opencl20, "CL2.0") +LANGSTANDARD_ALIAS_DEPR(opencl20, "CLC++") Shouldn't this be `openclcpp`? CHANGES SINCE LAST ACTION

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

2019-07-17 Thread Kévin Petit via Phabricator via cfe-commits
kpet accepted this revision. kpet added a comment. This revision is now accepted and ready to land. > Would it be ok if I fix those in a separate commit? I would really like to > commit the core part before the release branch is taken. I'm fine with this as long as we can continue the

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

2019-07-17 Thread Kévin Petit via Phabricator via cfe-commits
kpet requested changes to this revision. kpet added a comment. This revision now requires changes to proceed. Very useful to have all of this documented! Thanks! Comment at: docs/LanguageExtensions.rst:1527 +This functionality is built on top of OpenCL C v2.0 and C++17.

[PATCH] D62722: [Driver] Simplify Assemble and Backend action collapsing

2019-06-18 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. Friendly ping :). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62722/new/ https://reviews.llvm.org/D62722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D62722: [Driver] Simplify Assemble and Backend action collapsing

2019-05-31 Thread Kévin Petit via Phabricator via cfe-commits
kpet created this revision. kpet added reviewers: tra, ABataev, echristo, jlebar, hfinkel, rsmith. Herald added subscribers: cfe-commits, kristof.beyls, javed.absar. Herald added a project: clang. The action collapsing logic introduced in https://reviews.llvm.org/D21840 generally works by

[PATCH] D62377: [OpenCL] Add support for the cl_arm_integer_dot_product extensions

2019-05-24 Thread Kévin Petit via Phabricator via cfe-commits
kpet closed this revision. kpet added a comment. Committed as r361641. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62377/new/ https://reviews.llvm.org/D62377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D62377: [OpenCL] Add support for the cl_arm_integer_dot_product extensions

2019-05-24 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. Yes, indeed :). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62377/new/ https://reviews.llvm.org/D62377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D62377: [OpenCL] Add support for the cl_arm_integer_dot_product extensions

2019-05-24 Thread Kévin Petit via Phabricator via cfe-commits
kpet created this revision. kpet added a reviewer: Anastasia. Herald added subscribers: cfe-commits, kristof.beyls, javed.absar, yaxunl. Herald added a project: clang. Repository: rC Clang https://reviews.llvm.org/D62377 Files: clang/include/clang/Basic/OpenCLExtensions.def

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-09 Thread Kévin Petit via Phabricator via cfe-commits
kpet accepted this revision. kpet added a comment. This revision is now accepted and ready to land. The comments could use a bit more polishing but nothing that justifies making another iteration IMHO. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61488/new/

[PATCH] D61506: [OpenCL] Switch to C++17

2019-05-08 Thread Kévin Petit via Phabricator via cfe-commits
kpet accepted this revision. kpet added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61506/new/ https://reviews.llvm.org/D61506 ___ cfe-commits mailing list

[PATCH] D61639: Add Triple::isSPIR() to simplify code

2019-05-07 Thread Kévin Petit via Phabricator via cfe-commits
kpet created this revision. kpet added a reviewer: Anastasia. Herald added subscribers: llvm-commits, cfe-commits, dexonsmith. Herald added projects: clang, LLVM. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D61639 Files: clang/lib/CodeGen/CodeGenModule.cpp

[PATCH] D61506: [OpenCL] Switch to C++17

2019-05-03 Thread Kévin Petit via Phabricator via cfe-commits
kpet added inline comments. Comment at: include/clang/Frontend/LangStandards.def:162 OpenCL, "OpenCL C++ 1.0", - LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs | OpenCL) + LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-03 Thread Kévin Petit via Phabricator via cfe-commits
kpet added inline comments. Comment at: lib/CodeGen/CGDeclCXX.cpp:583 + // In OpenCL global init function should be converted to the kernel to be + // able to initiate its execution from the host side. functions should be -> must be? to the kernel -> to a

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-02 Thread Kévin Petit via Phabricator via cfe-commits
kpet updated this revision to Diff 197749. kpet added a comment. Clean up the tests. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61319/new/ https://reviews.llvm.org/D61319 Files: clang/lib/Sema/SemaOverload.cpp

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-02 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. Most of these are pre-existing issues with the tests but I agree they're worth fixing. I'll update the tests. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61319/new/ https://reviews.llvm.org/D61319

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-01 Thread Kévin Petit via Phabricator via cfe-commits
kpet updated this revision to Diff 197617. kpet added a comment. Replaced the AST dump test with an IR test. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61319/new/ https://reviews.llvm.org/D61319 Files: lib/Sema/SemaOverload.cpp

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-01 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. Ok, I'll replace the test with an IR-level test. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61319/new/ https://reviews.llvm.org/D61319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-04-30 Thread Kévin Petit via Phabricator via cfe-commits
kpet created this revision. kpet added reviewers: Anastasia, mikael. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. When the expression used to initialise this has a pointer type, check the address space of the pointee type instead of the pointer type to decide