[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-12 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/126324 >From 46cce74568bca5a3e80e50def4348bc734448362 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Fri, 7 Feb 2025 14:57:12 -0800 Subject: [PATCH 1/9] [Clang] Add __has_target_builtin macro Signed-off-by: Sarnie

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-12 Thread Nick Sarnie via cfe-commits
@@ -96,6 +100,47 @@ the header file to conditionally make a function constexpr whenever the constant evaluation of the corresponding builtin (for example, ``std::fmax`` calls ``__builtin_fmax``) is supported in Clang. +``__has_target_builtin`` + +

[clang] [llvm] [OpenMP][OpenMPIRBuilder] Support SPIR-V device variant matches (PR #126801)

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

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-12 Thread Nick Sarnie via cfe-commits
@@ -96,6 +100,47 @@ the header file to conditionally make a function constexpr whenever the constant evaluation of the corresponding builtin (for example, ``std::fmax`` calls ``__builtin_fmax``) is supported in Clang. +``__has_target_builtin`` + +

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)

2025-02-12 Thread Nick Sarnie via cfe-commits
@@ -2624,9 +2624,8 @@ void CGOpenMPRuntime::emitDistributeStaticInit( emitUpdateLocation(CGF, Loc, OMP_IDENT_WORK_DISTRIBUTE); llvm::Value *ThreadId = getThreadID(CGF, Loc); llvm::FunctionCallee StaticInitFunction; - bool isGPUDistribute = - CGM.getLangOpts().Op

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

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

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-12 Thread Nick Sarnie via cfe-commits
@@ -96,6 +100,47 @@ the header file to conditionally make a function constexpr whenever the constant evaluation of the corresponding builtin (for example, ``std::fmax`` calls ``__builtin_fmax``) is supported in Clang. +``__has_target_builtin`` + +

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)

2025-02-12 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] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)

2025-02-12 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] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)

2025-02-12 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] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)

2025-02-12 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review 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-02-21 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][ARM] Only try to redefine builtins for non-CUDA (PR #128222)

2025-02-21 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/128222 None >From b91e429ae1fc1cf8ea8239aba59789013961533c Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Fri, 21 Feb 2025 11:50:48 -0800 Subject: [PATCH] [Clang][ARM] Only try to redefine builtins for non-CUDA S

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

2025-02-21 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][ARM] Only try to redefine builtins for non-CUDA (PR #128222)

2025-02-21 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] Add __has_target_builtin macro (PR #126324)

2025-02-21 Thread Nick Sarnie via cfe-commits
sarnex wrote: PR for ARM CUDA https://github.com/llvm/llvm-project/pull/128222 https://github.com/llvm/llvm-project/pull/126324 ___ 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-02-21 Thread Nick Sarnie via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA__) sarnex wrote: Ah sorry, I didn't double-check the suggestion from [here](https://github.com/llvm/llvm-project/pull/121839#issuecomment-2617005659), will fix. https://github.com/llvm/llvm-project

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

2025-02-21 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/128222 >From b91e429ae1fc1cf8ea8239aba59789013961533c Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Fri, 21 Feb 2025 11:50:48 -0800 Subject: [PATCH 1/2] [Clang][ARM] Only try to redefine builtins for non-CUDA Sig

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

2025-02-21 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review 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] Only try to redefine builtins for non-CUDA (PR #128222)

2025-02-21 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][ARM] Only try to redefine builtins for non-CUDA (PR #128222)

2025-02-21 Thread Nick Sarnie via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + sarnex wrote: Do you mean we unconditionally define declarations, regardless of compilation mode or `__has_builtin` result? https://github.com/llvm/llvm-project/pull/128222 ___

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

2025-02-21 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] [llvm] [LLVM][Triple][NFCI] Add function to test for offloading triples (PR #126956)

2025-02-24 Thread Nick Sarnie via cfe-commits
@@ -1109,6 +1109,11 @@ class Triple { Env == llvm::Triple::EABIHF; } + /// Tests if the target represents a device which can be offloaded to. + bool isOffloadingTarget() const { +return isAMDGPU() || isNVPTX() || isSPIRV(); + } sarnex wrote

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for offloading triples (PR #126956)

2025-02-20 Thread Nick Sarnie via cfe-commits
@@ -1109,6 +1109,11 @@ class Triple { Env == llvm::Triple::EABIHF; } + /// Tests if the target represents a device which can be offloaded to. + bool isOffloadingTarget() const { +return isAMDGPU() || isNVPTX() || isSPIRV(); + } sarnex wrote

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-20 Thread Nick Sarnie via cfe-commits
sarnex wrote: @AaronBallman What do you recommend for next steps here? Should we wait until GCC makes a decision in [this issue](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118882)? https://github.com/llvm/llvm-project/pull/126324 ___ cfe-commits ma

[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

2025-02-20 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/128038 None >From e866ecff509662fd1f9942fb415291d43e20ee31 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 20 Feb 2025 09:52:35 -0800 Subject: [PATCH] [clang][NFC] Update isAuxBuiltinID comment Signed-off-by:

[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

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

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-20 Thread Nick Sarnie via cfe-commits
@@ -1819,8 +1822,12 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // usual allocation and deallocation functions. Required by libc++ return 201802; default: + // __has_target_builtin should return false for aux buil

[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

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

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-20 Thread Nick Sarnie via cfe-commits
@@ -1819,8 +1822,12 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // usual allocation and deallocation functions. Required by libc++ return 201802; default: + // __has_target_builtin should return false for aux buil

[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

2025-02-20 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/128038 >From e866ecff509662fd1f9942fb415291d43e20ee31 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 20 Feb 2025 09:52:35 -0800 Subject: [PATCH 1/2] [clang][NFC] Update isAuxBuiltinID comment Signed-off-by: S

[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

2025-02-20 Thread Nick Sarnie via cfe-commits
@@ -408,7 +408,9 @@ class Context { unsigned getRequiredVectorWidth(unsigned ID) const; - /// Return true if builtin ID belongs to AuxTarget. + /// Return true if builtin ID belongs to only the AuxTarget. sarnex wrote: sure, applied this in latest commit

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-20 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/126324 >From 46cce74568bca5a3e80e50def4348bc734448362 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Fri, 7 Feb 2025 14:57:12 -0800 Subject: [PATCH 01/10] [Clang] Add __has_target_builtin macro Signed-off-by: Sarn

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-20 Thread Nick Sarnie via cfe-commits
@@ -1819,8 +1822,12 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // usual allocation and deallocation functions. Required by libc++ return 201802; default: + // __has_target_builtin should return false for aux buil

[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

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

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-03-07 Thread Nick Sarnie via cfe-commits
sarnex wrote: So far RFC is going towards changing `__has_builtin` to respect the current target. If anyone has any comments please add them to the RFC [here](https://discourse.llvm.org/t/rfc-has-builtin-behavior-on-offloading-targets/84964). https://github.com/llvm/llvm-project/pull/126324 __

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

2025-03-06 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review 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] [clang][SPIR-V] Use the SPIR-V backend by default (PR #129545)

2025-03-11 Thread Nick Sarnie via cfe-commits
sarnex wrote: Thanks for the reviews all, merging! 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] [clang][SPIR-V] Use the SPIR-V backend by default (PR #129545)

2025-03-11 Thread Nick Sarnie 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-11 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed 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] [Clang][ARM] Only try to redefine builtins for non-CUDA (PR #128222)

2025-02-28 Thread Nick Sarnie via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + sarnex wrote: @compnerd @Bigcheese Do you mind taking a look at Artem's questions above? Thx https://github.com/llvm/llvm-project/pull/128222 ___

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

2025-03-13 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited 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] [clang] Remove usage of llvm-spirv in clang LIT tests (PR #131158)

2025-03-13 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/131158 We use the backend now, so remove the requirement from the only test that actually executes it and remove the LIT requirement variable. >From 196e880b258e48c18ec0f6a88a11eb8149d3b16b Mon Sep 17 00:00:00 2001 Fro

[clang] [clang][NFCI] Fix getGridValues for unsupported targets (PR #131023)

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

[clang] [LLVM][Triple][NFCI] Add function to test for offloading triples (PR #126956)

2025-03-05 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] [clang] Add isOffloadingTarget function to LangOpts Signed-off-b

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

2025-03-05 Thread Nick Sarnie via cfe-commits
@@ -1109,6 +1109,11 @@ class Triple { Env == llvm::Triple::EABIHF; } + /// Tests if the target represents a device which can be offloaded to. + bool isOffloadingTarget() const { +return isAMDGPU() || isNVPTX() || isSPIRV(); + } sarnex wrote

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

2025-03-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][NFCI] Fix getGridValues for unsupported targets (PR #131023)

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

[clang] [clang][NFCI] Fix getGridValues for unsupported targets (PR #131023)

2025-03-12 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/131023 >From 700cedcb1e2c241452f34177d1a597c3d3386e9d Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 12 Mar 2025 13:27:56 -0700 Subject: [PATCH] [clang][NFCI] Fix getGridValues for unsupported targets Signed-

[clang] [clang][NFCI] Fix getGridValues for unsupported targets (PR #131023)

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

[clang] [clang][NFCI] Fix getGridValues for unsupported targets (PR #131023)

2025-03-12 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/131023 I broke this in https://github.com/llvm/llvm-project/commit/f3cd2238383f695c719e7eab6aebec828781ec91, I should have added this to the `SPIRV64` subclass, but I accidentally added it to base `TargetInfo`. >From

[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] [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] [Headers] Implement spirvamdgcnintrin.h (PR #131164)

2025-03-18 Thread Nick Sarnie via cfe-commits
sarnex wrote: > @sarnex I'm assuming you're somewhat familiar with SPIR-V and the backend. We > really need a way to call SPIR-V builtins directly, i.e. some way to get > clang to lower something like __builtin_spirv_ballot() to > OpGroupNonUniformBallot. I don't know how much SPIR-V exposes f

[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/2] [clang] Add isOffloadingTarget function to LangOpts Signed-o

[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/2] [clang] Add isOffloadingTarget function to LangOpts Signed-o

[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] [flang] [llvm] [clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple (PR #126956)

2025-03-28 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed 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-04 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-04 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-04 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/134399 None >From 1eb8258d0c992880f39466d310cf3fc578a48bb9 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 3 Apr 2025 09:08:44 -0700 Subject: [PATCH] [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-04 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-04 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-04 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] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global cons

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

2025-04-04 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-04 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review 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] [Clang] Permit `-Xarch_` to be used with `--offload-arch` (PR #131884)

2025-03-19 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex approved this pull request. https://github.com/llvm/llvm-project/pull/131884 ___ 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-19 Thread Nick Sarnie via cfe-commits
@@ -3388,46 +3388,44 @@ Generic_GCC::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, } llvm::opt::DerivedArgList * -Generic_GCC::TranslateArgs(const llvm::opt::DerivedArgList &Args, StringRef, +Generic_GCC::TranslateArgs(const llvm::opt::DerivedArgList &Args, +

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

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

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

2025-04-02 Thread Nick Sarnie via cfe-commits
sarnex wrote: Yeah we definitely need that to be done. I believe @JonChesterfield's proposal was the most recent development. https://github.com/llvm/llvm-project/pull/133503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

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

2025-04-04 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/133503 ___ 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] [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] [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] [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

<    1   2   3