[clang] [flang] [llvm] [clang] Add isOffloadingTarget function to LangOpts (PR #126956)

2025-03-21 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/126956 >From 044158c176316e6c9f44ce1487ff631c8a0d15c4 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 4 Mar 2025 11:16:34 -0800 Subject: [PATCH 1/3] [clang] Add isOffloadingTarget function to LangOpts Signed-o

[clang] [flang] [llvm] [clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple (PR #126956)

2025-03-24 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/126956 >From 044158c176316e6c9f44ce1487ff631c8a0d15c4 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 4 Mar 2025 11:16:34 -0800 Subject: [PATCH 1/4] [clang] Add isOffloadingTarget function to LangOpts Signed-o

[clang] [Clang][ARM] Only try to redefine builtins for non-CUDA (PR #128222)

2025-03-17 Thread Nick Sarnie via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + sarnex wrote: @compnerd @Bigcheese Ping x2, thanks! https://github.com/llvm/llvm-project/pull/128222 ___ cfe-commits mailing list cfe-commits@lis

[clang] [Headers] Implement spirvamdgcnintrin.h (PR #131164)

2025-03-18 Thread Nick Sarnie via cfe-commits
sarnex wrote: No problem, as long as we have a somewhat reasonable way to eventually get the DeviceRTL working I'm happy, thanks for working on this. https://github.com/llvm/llvm-project/pull/131164 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [clang] Add isOffloadingTarget function to LangOpts (PR #126956)

2025-03-18 Thread Nick Sarnie via cfe-commits
@@ -4357,6 +4357,10 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, Opts.OpenACCMacroOverride = A->getValue(); } + Opts.IsOffloadingTarget = + (Opts.OpenMPIsTargetDevice || Opts.SYCLIsDevice || Opts.CUDAIsDevice) && s

[clang] [clang] Remove usage of llvm-spirv in clang LIT tests (PR #131158)

2025-03-14 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/131158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Offload] Handle `BoundArchitecture` for non-GPU targets (PR #132037)

2025-03-20 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex approved this pull request. https://github.com/llvm/llvm-project/pull/132037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple (PR #126956)

2025-04-05 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/126956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ARM] Only try to redefine builtins for non-CUDA (PR #128222)

2025-03-26 Thread Nick Sarnie via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + sarnex wrote: @Artem-B Any recommendations on moving forward since we seem to be having trouble getting the historical info on the change? https://github.com/llvm/llvm-project/pull/128222

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-10 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/134399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of global constants (PR #134399)

2025-04-09 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/134399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-10 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/134399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-10 Thread Nick Sarnie via cfe-commits
@@ -37,8 +37,8 @@ static const unsigned SPIRDefIsPrivMap[] = { 0, // cuda_device 0, // cuda_constant 0, // cuda_shared -// SYCL address space values for this map are dummy -0, // sycl_global +// Most SYCL address space values for this map are dummy -

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-10 Thread Nick Sarnie via cfe-commits
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; +if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) sarnex wr

[clang] [clang] Add SPIR-V to some OpenMP clang tests (PR #133503)

2025-03-28 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/133503 None >From 7cf849e39d4420dea961ec5e0633e25ba2659098 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Fri, 28 Mar 2025 10:38:37 -0700 Subject: [PATCH] [clang][test] Add SPIR-V to some OpenMP offload tests Sig

[clang] [clang] Add isOffloadingTarget function to LangOpts (PR #126956)

2025-03-15 Thread Nick Sarnie via cfe-commits
sarnex wrote: @arsenm Any comments on the above? Thx https://github.com/llvm/llvm-project/pull/126956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add isOffloadingTarget function to LangOpts (PR #126956)

2025-03-15 Thread Nick Sarnie via cfe-commits
sarnex wrote: > The target isn't part of the language, why is it in LangOpts? If you have a better suggestion I'm all areas, we seem to already have similar stuff in `LangOpts` such as `OMPTargetTriples`, `OMPHostIRFile`, `GPUDefaultStream`, and `CUID`. https://github.com/llvm/llvm-project/pu

[clang] [Headers] Create stub spirvintrin.h (PR #131164)

2025-03-17 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/131164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add isOffloadingTarget function to LangOpts (PR #126956)

2025-03-17 Thread Nick Sarnie via cfe-commits
sarnex wrote: @arsenm Ping :) https://github.com/llvm/llvm-project/pull/126956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-08 Thread Nick Sarnie via cfe-commits
@@ -37,8 +37,8 @@ static const unsigned SPIRDefIsPrivMap[] = { 0, // cuda_device 0, // cuda_constant 0, // cuda_shared -// SYCL address space values for this map are dummy -0, // sycl_global +// Most SYCL address space values for this map are dummy -

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-08 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/134399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-08 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/134399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-08 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/134399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-08 Thread Nick Sarnie via cfe-commits
@@ -37,8 +37,8 @@ static const unsigned SPIRDefIsPrivMap[] = { 0, // cuda_device 0, // cuda_constant 0, // cuda_shared -// SYCL address space values for this map are dummy -0, // sycl_global +// Most SYCL address space values for this map are dummy -

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-08 Thread Nick Sarnie via cfe-commits
@@ -37,8 +37,8 @@ static const unsigned SPIRDefIsPrivMap[] = { 0, // cuda_device 0, // cuda_constant 0, // cuda_shared -// SYCL address space values for this map are dummy -0, // sycl_global +// Most SYCL address space values for this map are dummy -

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-08 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/134399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-08 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/134399 >From 3812b132c83e4a2e7ae9bd0b5ecefe7232f86af1 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 3 Apr 2025 09:08:44 -0700 Subject: [PATCH 1/5] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of global constants (PR #134399)

2025-04-08 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/134399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of global constants (PR #134399)

2025-04-08 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/134399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix AS of globals and set the default AS to 4 (PR #135251)

2025-04-11 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/135251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix AS of globals and set the default AS to 4 (PR #135251)

2025-04-11 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/135251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ARM] Only try to redefine builtins for non-CUDA (PR #128222)

2025-04-11 Thread Nick Sarnie via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + sarnex wrote: @rnk Ping on this, thx! https://github.com/llvm/llvm-project/pull/128222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-07 Thread Nick Sarnie via cfe-commits
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; +if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) sarnex wr

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-07 Thread Nick Sarnie via cfe-commits
@@ -5402,6 +5407,10 @@ LangAS CodeGenModule::GetGlobalConstantAddressSpace() const { // UniformConstant storage class is not viable as pointers to it may not be // casted to Generic pointers which are used to model HIP's "flat" pointers. return LangAS::cuda_device

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-07 Thread Nick Sarnie via cfe-commits
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; +if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) sarnex wr

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-07 Thread Nick Sarnie via cfe-commits
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; +if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) sarnex wr

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-07 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/134399 >From 3812b132c83e4a2e7ae9bd0b5ecefe7232f86af1 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 3 Apr 2025 09:08:44 -0700 Subject: [PATCH 1/4] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-07 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/134399 >From 3812b132c83e4a2e7ae9bd0b5ecefe7232f86af1 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 3 Apr 2025 09:08:44 -0700 Subject: [PATCH 1/3] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-07 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/134399 >From 3812b132c83e4a2e7ae9bd0b5ecefe7232f86af1 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 3 Apr 2025 09:08:44 -0700 Subject: [PATCH 1/2] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global

[clang] [clang][Sema][SYCL] Fix MSVC STL usage on AMDGPU (PR #135979)

2025-04-17 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/135979 >From ca1fa9218048cc6a54b8ec912b11e630887cacae Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 16 Apr 2025 08:39:24 -0700 Subject: [PATCH] [clang][Sema][SYCL] Fix MSVC STL usage on AMDGPU Signed-off-by:

[clang] [clang][Sema][SYCL] Fix MSVC STL usage on AMDGPU (PR #135979)

2025-04-17 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/135979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-17 Thread Nick Sarnie via cfe-commits
@@ -792,6 +805,7 @@ bundleLinkedOutput(ArrayRef Images, const ArgList &Args, llvm::TimeTraceScope TimeScope("Bundle linked output"); switch (Kind) { case OFK_OpenMP: + case OFK_SYCL: return bundleOpenMP(Images); sarnex wrote: yeah if SYCL using th

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of global constants (PR #134399)

2025-04-18 Thread Nick Sarnie via cfe-commits
sarnex wrote: @alexfh FYI I expect the problem is in LLVM and not the translator, but it's not that this change is totally wrong it's just a missed case as the goal of this commit was to add the address space, not remove it. https://github.com/llvm/llvm-project/pull/134399

[clang] [clang][ARM][AArch64] Define intrinsics guarded by __has_builtin on all platforms (PR #128222)

2025-04-18 Thread Nick Sarnie via cfe-commits
@@ -36,6 +36,28 @@ typedef __SIZE_TYPE__ size_t; #include +#ifdef __ARM_ACLE +// arm_acle.h needs some stdint types, but -ffreestanding prevents us from sarnex wrote: `arm_acle.h` already includes the correct header, `stdint.h`, the problem here is this te

[clang] [clang][SemaARM][NFC] clang-format aarch64 builtin check (PR #136188)

2025-04-17 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/136188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ARM] Only try to redefine builtins for non-CUDA (PR #128222)

2025-04-17 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/128222 >From 9a28fa5772d1e4da50e629b9f397d50dc74bfa7b Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 17 Apr 2025 12:07:02 -0700 Subject: [PATCH] [clang][ARM] Define intrinsics guarded by __has_builtin on all

[clang] [clang][ARM][AArch64] Define intrinsics guarded by __has_builtin on all platforms (PR #128222)

2025-04-17 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/128222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema][SYCL] Fix MSVC STL usage on AMDGPU (PR #135979)

2025-04-18 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/135979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-17 Thread Nick Sarnie via cfe-commits
sarnex wrote: Thanks! https://github.com/llvm/llvm-project/pull/135683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SemaARM][NFC] clang-format aarch64 builtin check (PR #136188)

2025-04-17 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/136188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ARM][AArch64] Define intrinsics guarded by __has_builtin on all platforms (PR #128222)

2025-04-17 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/128222 >From 86cde46f62fae495077e3e8e00f75307d644e651 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 17 Apr 2025 12:07:02 -0700 Subject: [PATCH] [clang][ARM] Define intrinsics guarded by __has_builtin on all

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-17 Thread Nick Sarnie via cfe-commits
@@ -792,6 +805,7 @@ bundleLinkedOutput(ArrayRef Images, const ArgList &Args, llvm::TimeTraceScope TimeScope("Bundle linked output"); switch (Kind) { case OFK_OpenMP: + case OFK_SYCL: return bundleOpenMP(Images); sarnex wrote: fine with me, is this

[clang] [clang][Sema][SYCL] Fix MSVC STL usage on AMDGPU (PR #135979)

2025-04-17 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/135979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-17 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/135683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-17 Thread Nick Sarnie via cfe-commits
@@ -792,6 +805,7 @@ bundleLinkedOutput(ArrayRef Images, const ArgList &Args, llvm::TimeTraceScope TimeScope("Bundle linked output"); switch (Kind) { case OFK_OpenMP: + case OFK_SYCL: return bundleOpenMP(Images); sarnex wrote: should we change this

[clang] [clang][SemaARM][NFC] clang-format aarch64 builtin check (PR #136188)

2025-04-18 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/136188 Going to modify this code so needs formatting. >From c4e0e12499b8523622ddf37addb0deb106b80c2e Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 17 Apr 2025 12:46:15 -0700 Subject: [PATCH] [clang][SemaARM]

[clang] [clang][Sema][SYCL] Fix MSVC STL usage on AMDGPU (PR #135979)

2025-04-18 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/135979 >From ca1fa9218048cc6a54b8ec912b11e630887cacae Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 16 Apr 2025 08:39:24 -0700 Subject: [PATCH 1/2] [clang][Sema][SYCL] Fix MSVC STL usage on AMDGPU Signed-off

[clang] [clang][Sema][SYCL] Fix MSVC STL usage on AMDGPU (PR #135979)

2025-04-18 Thread Nick Sarnie via cfe-commits
@@ -5522,6 +5522,11 @@ bool Sema::CheckCallingConvAttr(const ParsedAttr &Attrs, CallingConv &CC, A = HostTI->checkCallingConvention(CC); if (A == TargetInfo::CCCR_OK && CheckDevice && DeviceTI) A = DeviceTI->checkCallingConvention(CC); + } else if (LangOpts.SY

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-18 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex approved this pull request. lgtm just a nit! https://github.com/llvm/llvm-project/pull/135683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema][SYCL] Fix MSVC STL usage on AMDGPU (PR #135979)

2025-04-18 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/135979 >From 6ed0ba1fcad3bbc34a392aef8ddb273bc70374a8 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 16 Apr 2025 08:39:24 -0700 Subject: [PATCH] [clang][Sema][SYCL] Fix MSVC STL usage on AMDGPU Signed-off-by:

[clang] [Clang][ARM] Only try to redefine builtins for non-CUDA (PR #128222)

2025-04-18 Thread Nick Sarnie via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + sarnex wrote: i just pushed a commit which attempts to implement this, please take a look, thanks! https://github.com/llvm/llvm-project/pull/128222

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix AS of globals and set the default AS to 4 (PR #135251)

2025-04-22 Thread Nick Sarnie via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fopenmp-targets=spirv64 -emit-llvm-bc %s -o %t-host.bc +// RUN: %clang_cc1 -fopenmp -fopenmp-targets=spirv64 -fopenmp-is-target-device -triple spirv64 -fopenmp-host-ir-file-path %t-host.bc -emit

[clang] [clang][ARM][AArch64] Define intrinsics guarded by __has_builtin on all platforms (PR #128222)

2025-04-22 Thread Nick Sarnie via cfe-commits
sarnex wrote: Investigating, thanks https://github.com/llvm/llvm-project/pull/128222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ARM][AArch64] Don't require arm_acle header for universally defined intrinsics (PR #136742)

2025-04-22 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/136742 >From f5f2d28bd1d878a7e202db91be31ae5b243e1fcf Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 22 Apr 2025 11:43:01 -0700 Subject: [PATCH 1/2] [clang][ARM][AArch64] Don't require arm_acle header for uni

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix AS of globals and set the default AS to 4 (PR #135251)

2025-04-22 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex converted_to_draft https://github.com/llvm/llvm-project/pull/135251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIR-V] Addrspace of opencl_global should always be 1 (PR #136753)

2025-04-22 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/136753 This fixes a CUDA SPIR-V regression introduced in https://github.com/llvm/llvm-project/pull/134399. >From e78694e52dfdcb6e2b085173952064a806d1d1a8 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 22 Ap

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix AS of globals and set the default AS to 4 (PR #135251)

2025-04-24 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/135251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIR-V] Fix OpenCL addrspace mapping when using non-zero default AS (PR #137187)

2025-04-24 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/137187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix AS of globals and set the default AS to 4 (PR #135251)

2025-04-24 Thread Nick Sarnie via cfe-commits
sarnex wrote: Thanks for the feedback, I'll work to address it. https://github.com/llvm/llvm-project/pull/135251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix AS of globals and set the default AS to 4 (PR #135251)

2025-04-24 Thread Nick Sarnie via cfe-commits
sarnex wrote: @alexfh The regression is fixed in https://github.com/llvm/llvm-project/commit/52a96491e1e4e0d033e39fad87f49ccd871df41d https://github.com/llvm/llvm-project/pull/135251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang][SPIR-V] Addrspace of opencl_global should always be 1 (PR #136753)

2025-04-24 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/136753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIR-V] Addrspace of opencl_global should always be 1 (PR #136753)

2025-04-24 Thread Nick Sarnie via cfe-commits
sarnex wrote: Thanks for the review, and will do @AlexVlx! https://github.com/llvm/llvm-project/pull/136753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix AS of globals and set the default AS to 4 (PR #135251)

2025-04-24 Thread Nick Sarnie via cfe-commits
@@ -1217,11 +1217,13 @@ void CGOpenMPRuntimeGPU::emitParallelCall(CodeGenFunction &CGF, CGBuilderTy &Bld = CGF.Builder; llvm::Value *NumThreadsVal = NumThreads; llvm::Function *WFn = WrapperFunctionsMap[OutlinedFn]; +llvm::FunctionCallee RuntimeFn = OMPBuilder.

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix AS of globals and set the default AS to 4 (PR #135251)

2025-04-24 Thread Nick Sarnie via cfe-commits
@@ -1217,11 +1217,13 @@ void CGOpenMPRuntimeGPU::emitParallelCall(CodeGenFunction &CGF, CGBuilderTy &Bld = CGF.Builder; llvm::Value *NumThreadsVal = NumThreads; llvm::Function *WFn = WrapperFunctionsMap[OutlinedFn]; +llvm::FunctionCallee RuntimeFn = OMPBuilder.

[clang] [clang][ARM][AArch64] Don't require arm_acle header for universally defined intrinsics (PR #136742)

2025-04-24 Thread Nick Sarnie via cfe-commits
sarnex wrote: Thanks, let me know what you find! I'll probably revert the original patch tomorrow to fix the regression and then rework it with the fix. https://github.com/llvm/llvm-project/pull/136742 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [clang][SPIR-V] Addrspace of opencl_global should always be 1 (PR #136753)

2025-04-23 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/136753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add spir_kernel attribute (PR #137882)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/137882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add spir_kernel attribute (PR #137882)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/137882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add spir_kernel attribute (PR #137882)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/137882 >From 563660698c09d0e8b0d3e4d240d9a0ceae092493 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 29 Apr 2025 14:40:43 -0700 Subject: [PATCH] [clang] Add spir_kernel attribute Signed-off-by: Sarnie, Nick

[clang] [llvm] [clang] Add spir_kernel attribute (PR #137882)

2025-04-29 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/137882 None >From 48a7768a33434e16c795ab8d575beb91480146f1 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 29 Apr 2025 14:40:43 -0700 Subject: [PATCH] [clang] Add spir_kernel attribute Signed-off-by: Sarnie,

[clang] [llvm] [clang] Add spir_kernel attribute (PR #137882)

2025-04-29 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/137882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add spir_kernel attribute (PR #137882)

2025-04-29 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex reopened https://github.com/llvm/llvm-project/pull/137882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Format two files with CallingConv switches (PR #138000)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/138000 I'm planning on modifying this code so format it so we can pass the formatting check. >From 3ae86aef81e0ae19e49a4c6db9869e327d4ad4fc Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 30 Apr 2025 10:33:58

[clang] [llvm] [clang] Add spir_kernel attribute (PR #137882)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/137882 >From 20498a3ab88fc60dfd425958c350e0d80f21951f Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 29 Apr 2025 14:40:43 -0700 Subject: [PATCH] [clang] Add spir_kernel attribute Signed-off-by: Sarnie, Nick

[clang] [llvm] [clang] Add spir_kernel attribute (PR #137882)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/137882 Rate limit ยท GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[clang] [clang][NFC] Format two files with CallingConv switches (PR #138000)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/138000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add spir_kernel attribute (PR #137882)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/137882 >From be91732b261f7a4874a9b1789fbf9bff6359cd58 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 30 Apr 2025 13:59:46 -0700 Subject: [PATCH] [clang] Add spir_kernel attribute Signed-off-by: Sarnie, Nick

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix AS of globals and set the default AS to 4 (PR #135251)

2025-04-10 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/135251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and set the default AS to 4 (PR #135251)

2025-04-10 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/135251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix AS of globals and set the default AS to 4 (PR #135251)

2025-04-16 Thread Nick Sarnie via cfe-commits
sarnex wrote: Ping on this one @jhuber6 @AlexVlx, thanks! https://github.com/llvm/llvm-project/pull/135251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of global constants (PR #134399)

2025-04-16 Thread Nick Sarnie via cfe-commits
sarnex wrote: No, tbe string should have an address space. Do you have a reproduction? https://github.com/llvm/llvm-project/pull/134399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Offload][SYCL] Refactor OffloadKind implementation (PR #135809)

2025-04-16 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex approved this pull request. https://github.com/llvm/llvm-project/pull/135809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Offload][SYCL] Refactor OffloadKind implementation (PR #135809)

2025-04-16 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/135809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema][SYCL] Fix MSVC STL usage on AMDGPU (PR #135979)

2025-04-16 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/135979 >From 2dfcad244b496c404ecf67a82c152d90591ec9ae Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 16 Apr 2025 08:39:24 -0700 Subject: [PATCH] [clang][Sema][SYCL] Fix MSVC STL usage on AMDGPU Signed-off-by:

[clang] [Clang][ARM] Only try to redefine builtins for non-CUDA (PR #128222)

2025-04-16 Thread Nick Sarnie via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + sarnex wrote: thanks, ill try to implement this assuming it's relatively easy https://github.com/llvm/llvm-project/pull/128222 ___ cfe-commits ma

[clang] [clang][NFC] Format two files with CallingConv switches (PR #138000)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/138000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Fix some clang-format mistakes (PR #138036)

2025-04-30 Thread Nick Sarnie via cfe-commits
sarnex wrote: Ignoring clang-format CI result https://github.com/llvm/llvm-project/pull/138036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Fix some clang-format mistakes (PR #138036)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/138036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Fix some clang-format mistakes (PR #138036)

2025-05-02 Thread Nick Sarnie via cfe-commits
@@ -3997,7 +3996,7 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI, RV = SI->getValueOperand(); SI->eraseFromParent(); -// Otherwise, we have to do a simple load. + // Otherwise, we have to do a simple load. s

[clang] [clang][Sema] Don't warn for implicit uses of builtins in system headers (PR #138205)

2025-05-02 Thread Nick Sarnie via cfe-commits
sarnex wrote: I think it's because we are explciitly marking these builtins as requiring a header. If they aren't declared that way then you won't see this warning and won't need this change. I made the builtins require a header based on feedback from @rnk in the earlier PR, and his suggestio

<    1   2   3   4   5   >