r266428 - Remove include duplicate. NFC.

2016-04-15 Thread Alexey Bader via cfe-commits
Author: bader Date: Fri Apr 15 08:23:26 2016 New Revision: 266428 URL: http://llvm.org/viewvc/llvm-project?rev=266428&view=rev Log: Remove include duplicate. NFC. Modified: cfe/trunk/lib/Sema/SemaType.cpp Modified: cfe/trunk/lib/Sema/SemaType.cpp URL: http://llvm.org/viewvc/llvm-project/cfe

Re: [PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL header file.

2016-04-15 Thread Alexey Bader via cfe-commits
bader added a comment. Sam, could you also add declarations of samplerless read_image and write_image built-in functions with read_write qualified images, please? http://reviews.llvm.org/D18369 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

Re: [PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL header file.

2016-04-18 Thread Alexey Bader via cfe-commits
bader added inline comments. Comment at: lib/Headers/opencl.h:14473-14474 @@ +14472,4 @@ + +float4 __const_func __attribute__((overloadable)) read_imagef(read_only image2d_t image, sampler_t sampler, int2 coord); +float4 __const_func __attribute__((overloadable)) read_imagef(read

Re: [PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL header file.

2016-04-18 Thread Alexey Bader via cfe-commits
bader added inline comments. Comment at: lib/Headers/opencl.h:14476-14479 @@ +14475,6 @@ + +#ifdef _HAS_READ_WRITE_IMAGE +float4 __attribute__((overloadable)) read_imagef(read_write image2d_t image, sampler_t sampler, int2 coord); +float4 __attribute__((overloadable)) read_imagef

Re: [PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL header file.

2016-04-19 Thread Alexey Bader via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. Thanks! http://reviews.llvm.org/D18369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

Re: [PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL header file.

2016-04-22 Thread Alexey Bader via cfe-commits
bader added inline comments. Comment at: lib/Headers/opencl.h:4870 @@ +4869,3 @@ + +#ifdef cl_khr_fp64 +char __const_func __attribute__((overloadable)) convert_char(double); Sam, could you confirm that this macro id implicitly defined for OpenCL versions 1.2+?

Re: [PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL header file.

2016-04-22 Thread Alexey Bader via cfe-commits
bader added a comment. BTW, there is a comment on GitHub that opencl.h might be a bad name for that header, since Khronos group provides the header with the same name, but it defines host API. So if some developer is using clang to compile OpenCL application it might accidentally include opencl

Re: [PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL header file.

2016-04-22 Thread Alexey Bader via cfe-commits
bader added inline comments. Comment at: lib/Headers/opencl.h:2 @@ +1,3 @@ +// +// SPIR Tools +// This comment should be updated. http://reviews.llvm.org/D18369 ___ cfe-commits mailing list cfe-c

Re: [PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL header file.

2016-04-22 Thread Alexey Bader via cfe-commits
bader added a comment. In http://reviews.llvm.org/D18369#409011, @yaxunl wrote: > In http://reviews.llvm.org/D18369#408773, @bader wrote: > > > BTW, there is a comment on GitHub that opencl.h might be a bad name for > > that header, since Khronos group provides the header with the same name, >

Re: [PATCH] D19524: [OpenCL] Fix pipe type dump.

2016-04-26 Thread Alexey Bader via cfe-commits
bader added a comment. LGTM. Probably it would be forth to add a simple test. http://reviews.llvm.org/D19524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20249: [OpenCL] Hierarchical/dynamic parallelism - enqueue kernel in OpenCL 2.0

2016-05-24 Thread Alexey Bader via cfe-commits
bader added inline comments. Comment at: lib/Sema/SemaChecking.cpp:81 @@ +80,3 @@ +static bool checkBlockArgs(Sema &S, Expr *BlockArg) { + const BlockPointerType *BPT = cast(BlockArg->getType()); + ArrayRef Params = There should be some check before cast. Here i

Re: [PATCH] D20602: Add .rgba syntax extension to ext_vector_type types

2016-05-25 Thread Alexey Bader via cfe-commits
bader added a subscriber: bader. bader added a comment. In http://reviews.llvm.org/D20602#438667, @rsmith wrote: > I'm not suggesting it be treated as invalid. This extension is part of at > least OpenCL 2.1, but it's not part of OpenCL 1.0. `ext_vector_type` is > Clang's implementation of the

Re: [PATCH] D20249: [OpenCL] Hierarchical/dynamic parallelism - enqueue kernel in OpenCL 2.0

2016-05-31 Thread Alexey Bader via cfe-commits
bader added a comment. Sorry for the delay. Is this code valid: clk_event_t e1, e2, e3; clk_event_t events[] = {e1, e2}; enqueue_kernel(get_default_queue(), 0, get_ndrange(), 2, events, &e3, ...); With this patch clang rejects it with an error: 'illegal call to enqueue_kernel, expected

Re: [PATCH] D20444: [OpenCL] Include opencl-c.h by default as a clang module

2016-06-02 Thread Alexey Bader via cfe-commits
bader accepted this revision. Comment at: test/Headers/opencl-c-header.cl:30-31 @@ +29,4 @@ + +// === +// Compile for OpenCL 2.0 for the first time. The module should change. +// RUN: %clang_cc1 -cc1 -emit-llvm -o - -cl-std=CL2.0 -finclude-default-header -fmodules -fimplicit-mod

Re: [PATCH] D20979: [OpenCL] Use function metadata to represent kernel attributes

2016-06-20 Thread Alexey Bader via cfe-commits
bader accepted this revision. bader added a comment. LGTM. Comment at: test/CodeGenOpenCL/kernel-attributes.cl:9 @@ -8,3 +10,1 @@ -// CHECK: opencl.kernels = !{[[MDNODE0:![0-9]+]], [[MDNODE3:![0-9]+]]} - AFAIK, this named metadata node were also useful for ker

Re: [PATCH] D20249: [OpenCL] Hierarchical/dynamic parallelism - enqueue kernel in OpenCL 2.0

2016-06-23 Thread Alexey Bader via cfe-commits
bader added a comment. Hi Anastasia, Sorry for the delay. I have just a few comments. Thanks, Alexey Comment at: lib/Sema/SemaChecking.cpp:95 @@ +94,3 @@ + IllegalParams = true; + break; +} It looks like this function will report only first inval

[PATCH] D21744: [OpenCL] Fix code generation of kernel pipe parameters.

2016-06-27 Thread Alexey Bader via cfe-commits
bader created this revision. bader added reviewers: Anastasia, pxli168. bader added subscribers: cfe-commits, yaxunl. Improved test with user define structure pipe type case. http://reviews.llvm.org/D21744 Files: lib/CodeGen/CodeGenFunction.cpp test/CodeGenOpenCL/pipe_types.cl Index: test/C

Re: [PATCH] D20249: [OpenCL] Hierarchical/dynamic parallelism - enqueue kernel in OpenCL 2.0

2016-06-27 Thread Alexey Bader via cfe-commits
bader accepted this revision. bader added a comment. LGTM. A few style nitpicks. Comment at: lib/CodeGen/CGBuiltin.cpp:2180-2181 @@ +2179,4 @@ +} +// Could have events and/or vaargs. +if (NumArgs >= 5) { + if (E->getArg(3)->getType()->isBlockPointerType()) { ---

[PATCH] D21795: [OpenCL] Add attribute 'pure' to read_image built-in functions to enable optimizations.

2016-06-28 Thread Alexey Bader via cfe-commits
bader created this revision. bader added reviewers: Anastasia, yaxunl. bader added subscribers: cfe-commits, pxli168, pekka.jaaskelainen. http://reviews.llvm.org/D21795 Files: lib/Headers/opencl-c.h Index: lib/Headers/opencl-c.h =

Re: [PATCH] D21744: [OpenCL] Fix code generation of kernel pipe parameters.

2016-06-28 Thread Alexey Bader via cfe-commits
bader updated this revision to Diff 62100. bader added a comment. Re-format the patch. No functional changes. http://reviews.llvm.org/D21744 Files: lib/CodeGen/CodeGenFunction.cpp test/CodeGenOpenCL/pipe_types.cl Index: test/CodeGenOpenCL/pipe_types.cl =

r274120 - [OpenCL] Fix typo in as_type test.

2016-06-29 Thread Alexey Bader via cfe-commits
Author: bader Date: Wed Jun 29 07:25:58 2016 New Revision: 274120 URL: http://llvm.org/viewvc/llvm-project?rev=274120&view=rev Log: [OpenCL] Fix typo in as_type test. Reset astype variable in f6 function to avoid matching with wrong value from f5 function. Modified: cfe/trunk/test/CodeGenOp

r274122 - [OpenCL] Add attribute 'pure' to read_image built-in functions to enable optimizations.

2016-06-29 Thread Alexey Bader via cfe-commits
Author: bader Date: Wed Jun 29 07:30:26 2016 New Revision: 274122 URL: http://llvm.org/viewvc/llvm-project?rev=274122&view=rev Log: [OpenCL] Add attribute 'pure' to read_image built-in functions to enable optimizations. Reviewers: Anastasia, yaxunl Subscribers: pekka.jaaskelainen, pxli168, cfe-

Re: [PATCH] D21795: [OpenCL] Add attribute 'pure' to read_image built-in functions to enable optimizations.

2016-06-29 Thread Alexey Bader via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL274122: [OpenCL] Add attribute 'pure' to read_image built-in functions to enable… (authored by bader). Changed prior to commit: http://reviews.llvm.org/D21795?vs=62094&id=62210#toc Repository: rL LLV

Re: [PATCH] D20249: [OpenCL] Hierarchical/dynamic parallelism - enqueue kernel in OpenCL 2.0

2016-07-01 Thread Alexey Bader via cfe-commits
bader added inline comments. Comment at: lib/Sema/SemaChecking.cpp:6773-6774 @@ -6772,4 +7016,2 @@ -namespace { - /// Structure recording the 'active' range of an integer-valued The con of this change - it will export all the symbols from this unnamed namespac

Re: [PATCH] D20249: [OpenCL] Hierarchical/dynamic parallelism - enqueue kernel in OpenCL 2.0

2016-07-01 Thread Alexey Bader via cfe-commits
bader added a comment. LGTM! Thanks a lot for working on this. http://reviews.llvm.org/D20249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21744: [OpenCL] Fix code generation of kernel pipe parameters.

2016-07-04 Thread Alexey Bader via cfe-commits
bader added a comment. Ping. Xiuli, do you have any comments? http://reviews.llvm.org/D21744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21989: [OpenCL] Improve diagnostics of OpenCL types

2016-07-05 Thread Alexey Bader via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. A few minor style comments. Comment at: lib/Sema/SemaExpr.cpp:10806-10807 @@ -10816,4 +10805,4 @@ // the ATOMIC_VAR_INIT macro. if (LHSExpr->getType()->isAtomicT

r274858 - [OpenCL] Fix access qualifiers handling for typedefs

2016-07-08 Thread Alexey Bader via cfe-commits
Author: bader Date: Fri Jul 8 10:34:59 2016 New Revision: 274858 URL: http://llvm.org/viewvc/llvm-project?rev=274858&view=rev Log: [OpenCL] Fix access qualifiers handling for typedefs OpenCL s6.6: "Access qualifier must be used with image object arguments of kernels and of user-defined functions

Re: [PATCH] D20948: [OpenCL] Fix access qualifiers handling for typedefs

2016-07-08 Thread Alexey Bader via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL274858: [OpenCL] Fix access qualifiers handling for typedefs (authored by bader). Changed prior to commit: http://reviews.llvm.org/D20948?vs=63222&id=63235#toc Repository: rL LLVM http://reviews.llv

Re: [PATCH] D21744: [OpenCL] Fix code generation of kernel pipe parameters.

2016-07-13 Thread Alexey Bader via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL275259: [OpenCL] Fix code generation of kernel pipe parameters. (authored by bader). Changed prior to commit: http://reviews.llvm.org/D21744?vs=62100&id=63791#toc Repository: rL LLVM http://reviews.

r275259 - [OpenCL] Fix code generation of kernel pipe parameters.

2016-07-13 Thread Alexey Bader via cfe-commits
Author: bader Date: Wed Jul 13 05:28:13 2016 New Revision: 275259 URL: http://llvm.org/viewvc/llvm-project?rev=275259&view=rev Log: [OpenCL] Fix code generation of kernel pipe parameters. Improved test with user define structure pipe type case. Reviewers: Anastasia, pxli168 Subscribers: yaxunl,

Re: [PATCH] D17821: [OpenCL] Complete image types support

2016-03-10 Thread Alexey Bader via cfe-commits
bader added a comment. If there are no objections to adopt this approach I can start working on rebasing that patch to the ToT. Comment at: include/clang/AST/OpenCLImageTypes.def:39 @@ +38,3 @@ + +IMAGE_READ_TYPE(image1d, OCLImage1d) +IMAGE_READ_TYPE(image1d_array, OCLImage1dAr

Re: [PATCH] D14441: [OpenCL] Pipe types support.

2015-11-12 Thread Alexey Bader via cfe-commits
bader added inline comments. Comment at: include/clang/Sema/DeclSpec.h:1426 @@ +1425,3 @@ +struct PipeTypeInfo : TypeInfoCommon { +/// The access writes. +unsigned AccessWrites : 3; pekka.jaaskelainen wrote: > I think this needs a better comment than d

Re: [PATCH] D14441: [OpenCL] Pipe types support.

2015-11-12 Thread Alexey Bader via cfe-commits
bader updated this revision to Diff 40058. bader marked 13 inline comments as done. bader added a comment. Applied code review comments. http://reviews.llvm.org/D14441 Files: include/clang/AST/ASTContext.h include/clang/AST/DataRecursiveASTVisitor.h include/clang/AST/RecursiveASTVisitor.h

Re: [PATCH] D14441: [OpenCL] Pipe types support.

2015-12-15 Thread Alexey Bader via cfe-commits
bader added a comment. Hi guys, Sorry for long silence. Unfortunately, I just can't find time to finish with this patch. Xiuli provided a valid test case that exposed issue with type caching, so I decided to not commit at as is (although I applied other minor style comments locally). I'm curre

Re: [PATCH] D14441: [OpenCL] Pipe types support.

2015-12-16 Thread Alexey Bader via cfe-commits
bader abandoned this revision. bader added a comment. New version of this patch was uploaded by pxli168 at http://reviews.llvm.org/D15603. http://reviews.llvm.org/D14441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

Re: [PATCH] D15603: [OpenCL] Pipe type support

2015-12-17 Thread Alexey Bader via cfe-commits
bader added inline comments. Comment at: include/clang/AST/Type.h:5020 @@ +5019,3 @@ +/// PipeType - OpenCL20. +/// +class PipeType : public Type, public llvm::FoldingSetNode { Xuili, could you apply the comments left by Pekka and Anastasia for the previous versi

[clang] [clang][CodeGen] Add AS for Globals to SPIR & SPIRV datalayouts (PR #88455)

2024-04-12 Thread Alexey Bader via cfe-commits
bader wrote: The change seems reasonable. > CodeGen/LLVM will default to AS0 in this case, which produces Globals that > end up in the private address space for e.g. OCL, HIPSPV or SYCL. Can we add a test checking LLVM address space for globals emitted from OCL/HIPSPV/SYCL, please? It's surpr

[clang] [clang][CodeGen] Add AS for Globals to SPIR & SPIRV datalayouts (PR #88455)

2024-04-12 Thread Alexey Bader via cfe-commits
https://github.com/bader commented: > I'll emphasise that this is only a problem for things such as implicitly > generated globals (e.g. VTables or typeinfo for classes etc.) I suppose usage of VTables and typeinfo is kind of restricted in GPU programming models. Right? Anyway, I think it's a

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-05-30 Thread Alexey Bader via cfe-commits
https://github.com/bader edited https://github.com/llvm/llvm-project/pull/89796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-05-30 Thread Alexey Bader via cfe-commits
@@ -1,4 +1,5 @@ ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv64-amd-amdhsa %s -o - | FileCheck %s bader wrote: I'm not sure if there is a value in testing `spirv64-amd-amdhsa` triple in addition to `spirv6

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-05-30 Thread Alexey Bader via cfe-commits
https://github.com/bader commented: I'm okay with the patch in general, but I'd like either @michalpaszkowski or @VyacheslavLevytskyy to take a look. Just one question about doubling the test scope for LLVM tests with spir64 target triple. https://github.com/llvm/llvm-project/pull/89796 __

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Alexey Bader via cfe-commits
@@ -14,9 +14,11 @@ #define LLVM_CLANG_SEMA_SEMASYCL_H #include "clang/AST/Decl.h" +#include "clang/AST/DeclBase.h" bader wrote: > This one should be fixed as well now. Can we drop `#include "clang/AST/Decl.h"` as well? https://github.com/llvm/llvm-project/p

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Alexey Bader via cfe-commits
@@ -14,9 +14,11 @@ #define LLVM_CLANG_SEMA_SEMASYCL_H #include "clang/AST/Decl.h" +#include "clang/AST/DeclBase.h" bader wrote: I'm okay with that. It just looks strange to add forward declaration for `Decl` class when full declaration is included with `#inc

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-05-13 Thread Alexey Bader via cfe-commits
bader wrote: @AlexVlx, do you think it's worth promoting [SPV_INTEL_inline_assembly](https://github.com/intel/llvm/blob/sycl/sycl/doc/design/spirv-extensions/SPV_INTEL_inline_assembly.asciidoc) and [SPV_INTEL_function_pointers](https://github.com/intel/llvm/blob/sycl/sycl/doc/design/spirv-exte

[clang] 7818906 - [SYCL] Implement SYCL address space attributes handling

2021-04-26 Thread Alexey Bader via cfe-commits
Author: Alexey Bader Date: 2021-04-26T13:44:10+03:00 New Revision: 7818906ca134775edffb77857f436359d3a50b90 URL: https://github.com/llvm/llvm-project/commit/7818906ca134775edffb77857f436359d3a50b90 DIFF: https://github.com/llvm/llvm-project/commit/7818906ca134775edffb77857f436359d3a50b90.diff

[clang] b52e69c - [SYCL][Doc] Add design document for SYCL mode

2021-04-26 Thread Alexey Bader via cfe-commits
Author: Alexey Bader Date: 2021-04-26T15:39:43+03:00 New Revision: b52e69c4268181d8143fe49aee0ea85395c8737d URL: https://github.com/llvm/llvm-project/commit/b52e69c4268181d8143fe49aee0ea85395c8737d DIFF: https://github.com/llvm/llvm-project/commit/b52e69c4268181d8143fe49aee0ea85395c8737d.diff

[clang] b2bb13a - [Doc] Add SYCLSupport.rst to index toctree.

2021-04-26 Thread Alexey Bader via cfe-commits
Author: Alexey Bader Date: 2021-04-26T16:16:10+03:00 New Revision: b2bb13a761644f675ec9f2d0b4371c51a05ab51c URL: https://github.com/llvm/llvm-project/commit/b2bb13a761644f675ec9f2d0b4371c51a05ab51c DIFF: https://github.com/llvm/llvm-project/commit/b2bb13a761644f675ec9f2d0b4371c51a05ab51c.diff

[clang] 76f84e7 - [Doc] Fix sphinx warnings about wrong code-block format

2021-04-30 Thread Alexey Bader via cfe-commits
Author: Alexey Bader Date: 2021-04-30T11:40:10+03:00 New Revision: 76f84e772978a3daef33df5bea7da676a0163f28 URL: https://github.com/llvm/llvm-project/commit/76f84e772978a3daef33df5bea7da676a0163f28 DIFF: https://github.com/llvm/llvm-project/commit/76f84e772978a3daef33df5bea7da676a0163f28.diff

[clang] 9ae5810 - [HIPSPV] Convert HIP kernels to SPIR-V kernels

2021-12-08 Thread Alexey Bader via cfe-commits
Author: Henry Linjamäki Date: 2021-12-08T12:18:15+03:00 New Revision: 9ae5810b53c2e096d7442ba8af3f00ebc3d301b0 URL: https://github.com/llvm/llvm-project/commit/9ae5810b53c2e096d7442ba8af3f00ebc3d301b0 DIFF: https://github.com/llvm/llvm-project/commit/9ae5810b53c2e096d7442ba8af3f00ebc3d301b0.dif

[clang] 95c614a - [NFC][SYCL] Drop idle triple component from regression tests.

2021-04-13 Thread Alexey Bader via cfe-commits
Author: Alexey Bader Date: 2021-04-13T08:00:21+03:00 New Revision: 95c614afcd4de71d00a240d6a4a02c036c972ed0 URL: https://github.com/llvm/llvm-project/commit/95c614afcd4de71d00a240d6a4a02c036c972ed0 DIFF: https://github.com/llvm/llvm-project/commit/95c614afcd4de71d00a240d6a4a02c036c972ed0.diff

[clang] [Clang] Allow all address spaces to be converted to the default (PR #112248)

2024-10-14 Thread Alexey Bader via cfe-commits
@@ -721,7 +721,9 @@ class Qualifiers { // to implicitly cast into the default address space. (A == LangAS::Default && (B == LangAS::cuda_constant || B == LangAS::cuda_device || - B == LangAS::cuda_shared)); + B == LangAS

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-21 Thread Alexey Bader via cfe-commits
https://github.com/bader edited https://github.com/llvm/llvm-project/pull/111389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-21 Thread Alexey Bader via cfe-commits
@@ -14296,6 +14296,30 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, bader wrote: `Context` parameter is unused. I suppose it might trigger a compiler warning. Can

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-21 Thread Alexey Bader via cfe-commits
https://github.com/bader approved this pull request. LGTM, thanks! I second @keryell: thank you for the good documentation. https://github.com/llvm/llvm-project/pull/111389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,500 @@ +//= clang-sycl-linker/ClangSYCLLinker.cpp - SYCL Linker util ---=// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,42 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -fsycl -emit-llvm -c %s -o %t.bc +// RUN: clang-sycl-linker --dry-run -triple spirv64 %t.bc -o a.spv 2>&1 \ +// RUN: | FileCheck %s --check-prefix=SIMPLE +// SI

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,42 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -fsycl -emit-llvm -c %s -o %t.bc +// RUN: clang-sycl-linker --dry-run -triple spirv64 %t.bc -o a.spv 2>&1 \ +// RUN: | FileCheck %s --check-prefix=SIMPLE +// SI

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,42 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -fsycl -emit-llvm -c %s -o %t.bc bader wrote: ```suggestion // RUN: %clangxx -emit-llvm -c %s -o %t.bc ``` `-fsycl` is useless here. We just nee

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,13 @@ +// Tests the driver when linking LLVM IR bitcode files and targeting SPIR-V +// architecture. +// +// RUN: touch %t.bc +// RUN: %clangxx --target=spirv64 --sycl-link -### %t.bc 2>&1 \ +// RUN: | FileCheck %s -check-prefix=LINK +// LINK: "{{.*}}clang-sycl-linker

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,500 @@ +//= clang-sycl-linker/ClangSYCLLinker.cpp - SYCL Linker util ---=// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-25 Thread Alexey Bader via cfe-commits
@@ -767,6 +768,27 @@ Driver::OpenMPRuntimeKind Driver::getOpenMPRuntime(const ArgList &Args) const { return RT; } +static const char *getDefaultSYCLArch(Compilation &C) { + // If -fsycl is supplied we will assume SPIR-V + if (C.getDefaultToolChain().getTriple().getArch()

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-29 Thread Alexey Bader via cfe-commits
https://github.com/bader approved this pull request. LGTM except a couple of minor nits. https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-29 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,13 @@ +// Tests the driver when linking LLVM IR bitcode files and targeting SPIR-V +// architecture. +// +// RUN: touch %t.bc +// RUN: %clangxx --target=spirv64 --sycl-link -### %t.bc 2>&1 \ +// RUN: | FileCheck %s -check-prefix=LINK +// LINK: "{{.*}}clang-sycl-linker

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-29 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,48 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -emit-llvm -c %s -o %t_1.bc +// RUN: %clangxx -emit-llvm -c %s -o %t_2.bc +// RUN: clang-sycl-linker --dry-run -triple spirv64 %t_1.bc %t_2.bc -o a.spv 2>&1 \ +/

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-29 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,42 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -fsycl -emit-llvm -c %s -o %t.bc +// RUN: clang-sycl-linker --dry-run -triple spirv64 %t.bc -o a.spv 2>&1 \ +// RUN: | FileCheck %s --check-prefix=SIMPLE +// SI

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,42 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -fsycl -emit-llvm -c %s -o %t.bc +// RUN: clang-sycl-linker --dry-run -triple spirv64 %t.bc -o a.spv 2>&1 \ +// RUN: | FileCheck %s --check-prefix=SIMPLE +// SI

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,500 @@ +//= clang-sycl-linker/ClangSYCLLinker.cpp - SYCL Linker util ---=// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,42 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -fsycl -emit-llvm -c %s -o %t.bc +// RUN: clang-sycl-linker --dry-run -triple spirv64 %t.bc -o a.spv 2>&1 \ +// RUN: | FileCheck %s --check-prefix=SIMPLE +// SI

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,55 @@ +include "llvm/Option/OptParser.td" + +def WrapperOnlyOption : OptionFlag; + +def help : Flag<["-", "--"], "help">, + HelpText<"Display available options (--help-hidden for more)">; + +def help_hidden : Flag<["-", "--"], "help-hidden">, + HelpText<"Display all a

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-29 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,55 @@ +include "llvm/Option/OptParser.td" + +def WrapperOnlyOption : OptionFlag; + +def help : Flag<["-", "--"], "help">, + HelpText<"Display available options (--help-hidden for more)">; + +def help_hidden : Flag<["-", "--"], "help-hidden">, + HelpText<"Display all a

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-24 Thread Alexey Bader via cfe-commits
@@ -762,6 +762,10 @@ class ToolChain { virtual void AddHIPIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const; + /// Add arguments to use SYCL specific includes. bader wrote: ```sugge

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-23 Thread Alexey Bader via cfe-commits
@@ -582,6 +582,10 @@ class Driver { /// @name Helper Methods /// @{ + /// MakeSYCLDeviceTriple - Returns the SYCL device triple for the + /// specified ArchType. + llvm::Triple MakeSYCLDeviceTriple(StringRef TargetArch = "spir64") const; bader wrote:

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-23 Thread Alexey Bader via cfe-commits
@@ -1073,6 +1074,8 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA, getToolChain().AddCudaIncludeArgs(Args, CmdArgs); if (JA.isOffloading(Action::OFK_HIP)) getToolChain().AddHIPIncludeArgs(Args, CmdArgs); + if (JA.isOffloading(Action::OFK_

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-23 Thread Alexey Bader via cfe-commits
https://github.com/bader commented: @mdtoguchi, thank you for working on this! Overall, looks good to me, but I made a few suggestions in the comments. It would be great if @tahonermann and @AaronBallman can confirm that all their comments are addressed. https://github.com/llvm/llvm-project/pul

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-23 Thread Alexey Bader via cfe-commits
@@ -217,10 +217,11 @@ static bool ActionFailed(const Action *A, if (FailingCommands.empty()) return false; - // CUDA/HIP can have the same input source code compiled multiple times so do - // not compiled again if there are already failures. It is OK to abort the - //

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-31 Thread Alexey Bader via cfe-commits
@@ -5116,11 +5123,34 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (const Arg *PF = Args.getLastArg(options::OPT_mprintf_kind_EQ)) PF->claim(); - if (Args.hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, false)) { -CmdArgs.push_back("-fsycl-

[clang] [Clang][SYCL] Fix use of uninitalized memory in temp files (PR #114488)

2024-10-31 Thread Alexey Bader via cfe-commits
bader wrote: PR title: "[Clang][SYCL] Fix use of uninitalized memory in temp files" tag: [Clang][SYCL] -> [clang-sycl-linker] typo: uninitalized -> uninitialized https://github.com/llvm/llvm-project/pull/114488 ___ cfe-commits mailing list cfe-commit

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-23 Thread Alexey Bader via cfe-commits
@@ -4867,12 +4946,13 @@ Action *Driver::ConstructPhaseAction( return C.MakeAction(Input, Output); } if (Args.hasArg(options::OPT_emit_llvm) || -(((Input->getOffloadingToolChain() && - Input->getOffloadingToolChain()->getTriple().isAMDGPU()) || -

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-23 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,188 @@ +//===--- SYCL.cpp - SYCL Tool and ToolChain Implementations -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-25 Thread Alexey Bader via cfe-commits
https://github.com/bader approved this pull request. Thanks. No other comments from my side. https://github.com/llvm/llvm-project/pull/107493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-24 Thread Alexey Bader via cfe-commits
https://github.com/bader edited https://github.com/llvm/llvm-project/pull/107493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] Change SYCL version according to standard (PR #114790)

2024-11-26 Thread Alexey Bader via cfe-commits
https://github.com/bader edited https://github.com/llvm/llvm-project/pull/114790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] Change SYCL version according to standard (PR #114790)

2024-11-26 Thread Alexey Bader via cfe-commits
https://github.com/bader approved this pull request. https://github.com/llvm/llvm-project/pull/114790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] Change SYCL version according to standard (PR #114790)

2024-12-05 Thread Alexey Bader via cfe-commits
https://github.com/bader closed https://github.com/llvm/llvm-project/pull/114790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][opt][Transforms][SPIR-V] Enable `InferAddressSpaces` for SPIR-V (PR #110897)

2024-12-04 Thread Alexey Bader via cfe-commits
@@ -92,6 +98,65 @@ SPIRVTargetMachine::SPIRVTargetMachine(const Target &T, const Triple &TT, setRequiresStructuredCFG(false); } +enum AddressSpace { + Function = storageClassToAddressSpace(SPIRV::StorageClass::Function), + CrossWorkgroup = + storageClassToAddressSpac

[clang] [llvm] [llvm][opt][Transforms][SPIR-V] Enable `InferAddressSpaces` for SPIR-V (PR #110897)

2024-12-04 Thread Alexey Bader via cfe-commits
@@ -178,6 +266,9 @@ void SPIRVPassConfig::addIRPasses() { addPass(createSPIRVStructurizerPass()); } + if (TM.getOptLevel() > CodeGenOptLevel::None) +addPass(createInferAddressSpacesPass(AddressSpace::Generic)); bader wrote: Out of curiosity, why do

[clang] [Driver][SPIR-V] Use consistent tools to convert between text and binary form (PR #120266)

2025-01-07 Thread Alexey Bader via cfe-commits
https://github.com/bader approved this pull request. LGTM. @svenvh, do you have any objections? https://github.com/llvm/llvm-project/pull/120266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-22 Thread Alexey Bader via cfe-commits
@@ -362,3 +364,93 @@ void SemaSYCL::CheckSYCLEntryPointFunctionDecl(FunctionDecl *FD) { } } } + +namespace { + +// The body of a function declared with the [[sycl_kernel_entry_point]] +// attribute is cloned and transformed to substitute references to the original +// fu

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-22 Thread Alexey Bader via cfe-commits
https://github.com/bader approved this pull request. @tahonermann thanks a lot for the work. I really appreciate the detailed description and comments! @erichkeane did a great job with the code review, so I have nothing to add. I just have one small question that does not affect the merge. ht

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-22 Thread Alexey Bader via cfe-commits
https://github.com/bader edited https://github.com/llvm/llvm-project/pull/122379 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver][SPIR-V] Make tool names consistent (PR #122343)

2025-01-10 Thread Alexey Bader via cfe-commits
https://github.com/bader approved this pull request. https://github.com/llvm/llvm-project/pull/122343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2025-01-09 Thread Alexey Bader via cfe-commits
https://github.com/bader approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/120327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SYCL] Disable float128 device mode diagnostic (PR #128513)

2025-03-13 Thread Alexey Bader via cfe-commits
@@ -4700,7 +4700,8 @@ void Sema::AddModeAttr(Decl *D, const AttributeCommonInfo &CI, if (NewElemTy.isNull()) { // Only emit diagnostic on host for 128-bit mode attribute -if (!(DestWidth == 128 && getLangOpts().CUDAIsDevice)) +if (!(DestWidth == 128 && +

[clang] [Clang] Permit `-Xarch_` to be used with `--offload-arch` (PR #131884)

2025-03-18 Thread Alexey Bader via cfe-commits
bader wrote: > Like SPIRV is doing `nvidia_gpu_sm_89` instead of just `-Xarch_nvptx64 > --offload-arch=sm_89`. Like SYCL? https://github.com/llvm/llvm-project/pull/131884 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-03-26 Thread Alexey Bader via cfe-commits
@@ -229,6 +229,12 @@ class CodeGenTypes { const CGFunctionInfo &arrangeBuiltinFunctionCall(QualType resultType, const CallArgList &args); + /// A SYCL device kernel function is a free standing function with + /// spir_kern

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-03-26 Thread Alexey Bader via cfe-commits
https://github.com/bader approved this pull request. https://github.com/llvm/llvm-project/pull/133030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-07 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,186 @@ +// RUN: %clang_cc1 -fsycl-is-host -emit-llvm -triple x86_64-unknown-linux-gnu %s -o - | FileCheck --check-prefixes=CHECK-HOST,CHECK-HOST-LINUX %s +// RUN: %clang_cc1 -fsycl-is-device -emit-llvm -aux-triple x86_64-unknown-linux-gnu -triple amdgcn-amd-amdhsa %s

<    1   2