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

2024-04-14 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Thanks @AlexVlx for this change. This should work fine for SPIRV-LLVM-Translator (and SPIR-V backend). Adding @michalpaszkowski for input from SPIR-V backend side. Recently, this restriction on LLVM IR input to our translator was docuemnted: https://github.com/KhronosGroup/SPIR

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

2024-05-30 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: > 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. +1 on this. I will take a look before end of week on this. Thanks h

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

2024-04-15 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa approved this pull request. Thanks for this change. LGTM https://github.com/llvm/llvm-project/pull/88455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-14 Thread Arvind Sudarsanam via cfe-commits
@@ -0,0 +1,530 @@ +//=-- clang-sycl-link-wrapper/ClangSYCLLinkWrapper.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-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-14 Thread Arvind Sudarsanam via cfe-commits
@@ -0,0 +1,530 @@ +//=-- clang-sycl-link-wrapper/ClangSYCLLinkWrapper.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-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-14 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/112245 >From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Fri, 27 Sep 2024 13:03:12 -0700 Subject: [PATCH 1/2] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link

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

2024-10-14 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Good point. I will create them inside the test case. I was trying to 'mimic' device library file usage. I suppose it's overkill. Thanks. https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commit

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

2024-10-14 Thread Arvind Sudarsanam via cfe-commits
@@ -95,7 +95,19 @@ void SPIRV::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-o"); CmdArgs.push_back(Output.getFilename()); + // Use of --sycl-link will call the clang-sycl-link-wrapper instead of + // the default linker (spirv-link). + i

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

2024-10-14 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Hi @jhuber6 Thanks much for providing your feedback. I will address all your comments in an upcoming commit. Sincerely https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

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

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
@@ -6728,7 +6728,10 @@ def fsycl : Flag<["-"], "fsycl">, def fno_sycl : Flag<["-"], "fno-sycl">, Visibility<[ClangOption, CLOption]>, Group, HelpText<"Disables SYCL kernels compilation for device">; - +def sycl_link : Flag<["--"], "sycl-link">, Flags<[HelpHidden]>,

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

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa edited 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-commits

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

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
@@ -95,7 +95,19 @@ void SPIRV::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-o"); CmdArgs.push_back(Output.getFilename()); + // Use of --sycl-link will call the clang-sycl-link-wrapper instead of + // the default linker (spirv-link). + i

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

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/112245 >From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Fri, 27 Sep 2024 13:03:12 -0700 Subject: [PATCH 1/4] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link

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

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/112245 >From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Fri, 27 Sep 2024 13:03:12 -0700 Subject: [PATCH 1/5] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link

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

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Earlier test fail due to lack of new tool in clang/test/lit.cfg.py. Added it now. Thanks https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

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

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
@@ -95,7 +95,19 @@ void SPIRV::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-o"); CmdArgs.push_back(Output.getFilename()); + // Use of --sycl-link will call the clang-sycl-link-wrapper instead of + // the default linker (spirv-link). + i

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

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Modified the test to just use empty files. Change can be found in 307c74ea4f910a7698a6084db710ff7b699c5c93 Thanks https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing list cfe-com

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

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
@@ -0,0 +1,528 @@ +//=-- clang-sycl-link-wrapper/ClangSYCLLinkWrapper.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-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
@@ -0,0 +1,528 @@ +//=-- clang-sycl-link-wrapper/ClangSYCLLinkWrapper.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-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Hi @jhuber6 I have addressed all the concerns to my best ability. Thanks very much for your guidance and feedback thus far. Thanks Sincerely https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing list cfe-commits@l

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

2024-10-16 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/112245 >From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Fri, 27 Sep 2024 13:03:12 -0700 Subject: [PATCH 1/9] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link

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

2024-10-16 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa edited 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-commits

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

2024-10-16 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/112245 >From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Fri, 27 Sep 2024 13:03:12 -0700 Subject: [PATCH 01/10] [Clang][SYCL] Introduce clang-sycl-link-wrapper to li

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

2024-10-16 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: clang/test/Driver is not the correct place to be testing for tool availability. Thanks https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloadi… (PR #112245)

2024-10-14 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa created https://github.com/llvm/llvm-project/pull/112245 …ng device code This PR is one of the many PRs in the SYCL upstreaming effort focusing on device code linking during the SYCL offload compilation process. RFC: https://discourse.llvm.org/t/rfc-offloading-desi

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (PR #112245)

2024-10-14 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa edited 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-commits

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloadi… (PR #112245)

2024-10-14 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa edited 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-commits

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

2024-10-14 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa edited 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-commits

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

2024-10-14 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: This PR is the first in the list of multiple PRs that will be submitted to add SYCL offloading support using the new offloading model. Upcoming PRs include: 1. SYCL finalization steps that will run after llvm-link will be added to the linking clow inside clang-sycl-link-wrapper.

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

2024-10-14 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: @jhuber6 Can you please take a look at this PR when convenient? Thanks for all your inputs in getting this PR ready. Sincerely https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

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

2024-10-22 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Hi @llvm-beanz Thanks so much for providing your valuable time and feedback thus far. I have addressed the concerns raised to the best of my ability. I have added more testing inside 'clang/test/Driver/clang-sycl-linker-test.cpp'. It will be great if you can take another look

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

2024-10-22 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: @bader, thanks for adding the SYCL label. Can you please provide your feedback for this PR when convenient? For some reason, I am not able to add reviewers. Thanks https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits maili

[clang] [clang-linker-wrapper] Add error handling for missing linker path (PR #113613)

2024-10-24 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: @jhuber6 Can you please take a look and comment if this change looks ok. Thanks https://github.com/llvm/llvm-project/pull/113613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang-linker-wrapper] Add error handling for missing linker path (PR #113613)

2024-10-24 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa created https://github.com/llvm/llvm-project/pull/113613 In clang-linker-wrapper, we do not explicitly check if --linker-path is provided. This PR adds a check to capture this. Thanks >From 5b890e60ad8c349254d687e96452a8f575e5 Mon Sep 17 00:00:00 2001 From: Arv

[clang] [clang-linker-wrapper] Add error handling for missing linker path (PR #113613)

2024-10-24 Thread Arvind Sudarsanam via cfe-commits
@@ -370,6 +370,8 @@ Error runLinker(ArrayRef Files, const ArgList &Args) { // Render the linker arguments and add the newly created image. We add it // after the output file to ensure it is linked with the correct libraries. StringRef LinkerPath = Args.getLastArgValue(OP

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

2024-10-29 Thread Arvind Sudarsanam 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 Arvind Sudarsanam 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 Arvind Sudarsanam 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-29 Thread Arvind Sudarsanam 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 Arvind Sudarsanam 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 Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/112245 >From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Fri, 27 Sep 2024 13:03:12 -0700 Subject: [PATCH 01/11] [Clang][SYCL] Introduce clang-sycl-link-wrapper to li

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

2024-10-29 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Hi @bader Thanks very much for your feedback. I have addressed the concerns in the latest commit. Thanks to @jhuber6 for some responses as well. Sincerely https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing list

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

2024-10-29 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/112245 >From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Fri, 27 Sep 2024 13:03:12 -0700 Subject: [PATCH 01/12] [Clang][SYCL] Introduce clang-sycl-link-wrapper to li

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

2024-10-29 Thread Arvind Sudarsanam 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-29 Thread Arvind Sudarsanam 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-30 Thread Arvind Sudarsanam 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] Initialize SmallVector variable (PR #114434)

2024-10-31 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa created https://github.com/llvm/llvm-project/pull/114434 None >From 9cfc10768adf19e41b22cd6a9fb2c781fdf4498e Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Thu, 31 Oct 2024 10:34:06 -0700 Subject: [PATCH] Initialize SmallVector variable Signed-off-by: Arvin

[clang] [clang-linker-wrapper] Add error handling for missing linker path (PR #113613)

2024-10-25 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/113613 >From 5b890e60ad8c349254d687e96452a8f575e5 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Thu, 24 Oct 2024 12:46:18 -0700 Subject: [PATCH 1/2] [clang-linker-wrapper] Add error handling for missing

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

2024-10-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: All the failures seem to be related to missing dependencies. I am working on a fix. Thanks https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

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

2024-10-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Sanitizer test failures should be resolved by https://github.com/llvm/llvm-project/pull/114488 (under review). Thanks to @sarnex for the timely fix. Sincerely https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing li

[clang] Initialize SmallVector variable (PR #114434)

2024-10-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: This is not the correct fix. Closing it. Thanks https://github.com/llvm/llvm-project/pull/114434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Initialize SmallVector variable (PR #114434)

2024-10-31 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa closed https://github.com/llvm/llvm-project/pull/114434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen][SPIR-V] Fix incorrect SYCL usage, implement missing interface (PR #109415)

2024-09-24 Thread Arvind Sudarsanam via cfe-commits
@@ -188,6 +190,28 @@ void SPIRVTargetCodeGenInfo::setCUDAKernelCallingConvention( } } +LangAS +SPIRVTargetCodeGenInfo::getGlobalVarAddressSpace(CodeGenModule &CGM, + const VarDecl *D) const { + assert(!CGM.getLangOpts().OpenC

[clang] [clang][CodeGen][SPIR-V] Fix incorrect SYCL usage, implement missing interface (PR #109415)

2024-09-25 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: > > Are there any tests available to check this behavior? > > The reworked tests do verify / rely on this behaviour, but I can add an > individual test for both vanilla and AMDGCN flavoured SPIR-V, if that is > preferred (might be better anyway). Thanks @AlexVlx I will approv

[clang] [clang][CodeGen][SPIR-V] Fix incorrect SYCL usage, implement missing interface (PR #109415)

2024-09-25 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa approved this pull request. LGTM. Addition of new tests can be done in this PR or a follow-up PR. Thanks https://github.com/llvm/llvm-project/pull/109415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

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

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/112245 >From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Fri, 27 Sep 2024 13:03:12 -0700 Subject: [PATCH 1/7] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link

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

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: > At a minimum I think this change needs more tests. There's a lot of code > added with very minimal test coverage. > > I'm uncomfortable with adding a design that is effectively a workaround with > an unwritten "TODO" to fix it up later, but I also don't want to needlessly >

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

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/112245 >From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Fri, 27 Sep 2024 13:03:12 -0700 Subject: [PATCH 1/8] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link

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

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Hi @llvm-beanz and @jhuber6 Thanks so much for all the feedback and discussion here. I am very much grateful for both your time and insights here. I will try to give my answers in this comment. An overview of the SYCL compilation flow (with a bit more emphasis on the device c

[clang] [llvm] [SYCL][DOC] Add documentation for SYCL compilation flow (PR #129973)

2025-03-05 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa closed https://github.com/llvm/llvm-project/pull/129973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIR-V] Use the SPIR-V backend by default (PR #129545)

2025-03-05 Thread Arvind Sudarsanam via cfe-commits
@@ -78,7 +77,7 @@ class LLVM_LIBRARY_VISIBILITY SPIRVToolChain : public ToolChain { bool useIntegratedAs() const override { return true; } - bool IsIntegratedBackendDefault() const override { return false; } + bool IsIntegratedBackendDefault() const override { return tru

[clang] [clang][SPIR-V] Use the SPIR-V backend by default (PR #129545)

2025-03-05 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/129545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support inside clang-sycl-linker (PR #133967)

2025-04-02 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/133967 >From 0ab40315cd5ca320d84f87c99b8f23d9b6e8ed36 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Mon, 31 Mar 2025 14:31:24 -0700 Subject: [PATCH 1/5] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V b

[clang] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support inside clang-sycl-linker (PR #133967)

2025-04-02 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/133967 >From 0ab40315cd5ca320d84f87c99b8f23d9b6e8ed36 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Mon, 31 Mar 2025 14:31:24 -0700 Subject: [PATCH 1/6] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V b

[clang] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support inside clang-sycl-linker (PR #133967)

2025-04-02 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: @sarnex, @jhuber6 Thanks much for your kind feedbacks. This is ready to be merged. Can one of you please help? Sincerely https://github.com/llvm/llvm-project/pull/133967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support inside clang-sycl-linker (PR #133967)

2025-04-02 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/133967 >From 0ab40315cd5ca320d84f87c99b8f23d9b6e8ed36 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Mon, 31 Mar 2025 14:31:24 -0700 Subject: [PATCH 1/6] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V b

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-04-03 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: For the test failures, please resync with the tip of the repo and the test failure should disappear. https://github.com/llvm/llvm-project/pull/133194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-04-03 Thread Arvind Sudarsanam via cfe-commits
@@ -163,6 +220,15 @@ static inline bool IsAMDOffloadArch(OffloadArch A) { return A >= OffloadArch::GFX600 && A < OffloadArch::Generic; } +static inline bool IsIntelCPUArch(OffloadArch Arch) { asudarsa wrote: For sake of completion, can you please add IsInte

[clang] [Clang] Disable RTTI for offloading at the frontend level (PR #127082)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
@@ -7117,6 +7117,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } } + // The offloading devices do not support RTTI. asudarsa wrote: I see that IsHIPDevice has been added to the check here (compared to what was deleted inside Cod

[clang] [Clang] Introduce '--offload-targets=' to generically target toolchains (PR #125556)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Hi @jhuber6 Just a quick ping to check if this PR is still alive. I can take a look if it is. Thanks https://github.com/llvm/llvm-project/pull/125556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [CMAKE][AMDGPU] fix build failure caused by PR #133619 (PR #133776)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa edited https://github.com/llvm/llvm-project/pull/133776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMAKE][AMDGPU] fix build failure caused by PR #133619 (PR #133776)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: > > > @farzonl can you please revert the original commit? It seems to break > > > just any LLVM build, so I guess the CI testing of all new PRs should be > > > affected. > > > > > > I don't see it breaking any build in LLVM, just the amd offload ones. Al > > the Premerge test

[clang] [CMAKE][AMDGPU] fix build failure caused by PR #133619 (PR #133776)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/133776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-sycl-linker] Replace llvm-link with API calls (PR #133797)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/133797 >From 675595e453b2452e49847ba3b949909367c7942a Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Mon, 31 Mar 2025 13:04:47 -0700 Subject: [PATCH 1/2] [clang-sycl-linker] Replace llvm-link with API calls T

[clang] [CMAKE][AMDGPU] fix build failure caused by PR #133619 (PR #133776)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa commented: I tried to build it locally and I got a series of 'undefined reference' errors. Sorry, I will need to revert my approval. Thanks https://github.com/llvm/llvm-project/pull/133776 ___ cfe-commits mailing list cfe-

[clang] [Clang][SYCL] Add support AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Please remove redundant 'support' from PR topic https://github.com/llvm/llvm-project/pull/133194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-sycl-linker] Replace llvm-link with API calls (PR #133797)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: > Shouldn't we be able to just use LTO after the SPIR-V backend left > experimental? Hi @jhuber6 Thanks for the ping back. That is the eventual path for us. However, we would like to do it in stages. Replacing llvm-link tool with linkInModule call helps us to achieve one of

[clang] [clang-sycl-linker] Replace llvm-link with API calls (PR #133797)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: @jhuber6 Can you please take a look? This is one of the many changes we are making to upstream SYCL. Thanks https://github.com/llvm/llvm-project/pull/133797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [clang-sycl-linker] Replace llvm-link with API calls (PR #133797)

2025-04-01 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa created https://github.com/llvm/llvm-project/pull/133797 This PR has the following changes: Replace llvm-link with calls to linkInModule to link device files Add -print-linked-module option to dump linked module for testing Added a test to verify that linking is wo