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

2025-05-02 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed 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][Sema] Don't warn for implicit uses of builtins in system headers (PR #138205)

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

[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
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Fix some more incorrectly formatted comments (PR #138342)

2025-05-02 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/138342 More fixes based on https://github.com/llvm/llvm-project/pull/138036 >From 5540b8d5bc0130b2089c219d49e856ab6817420b Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Fri, 2 May 2025 13:39:59 -0700 Subject: [PA

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

2025-05-01 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex converted_to_draft 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-05-01 Thread Nick Sarnie via cfe-commits
sarnex wrote: > I was thinking that orthogonal calling conventions could be combined so that > we need fewer of them. e.g., if spir_kernel cannot be mixed with nvptx_kernel > in the same TU, then there's no need for two distinct internal > representations for the attributes, just two distinct

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

2025-05-01 Thread Nick Sarnie via cfe-commits
@@ -1504,6 +1506,12 @@ def NVPTXKernel : InheritableAttr, TargetSpecificAttr { let Documentation = [Undocumented]; } +def SPIRKernel : InheritableAttr, TargetSpecificAttr { + let Spellings = [Clang<"spir_kernel">]; + let Subjects = SubjectList<[Function]>; + let Document

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

2025-05-01 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review 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-05-01 Thread Nick Sarnie via cfe-commits
sarnex wrote: > Do we need yet another calling convention or is there a way we can start to > combine some of these for all the offloading languages? It seems we keep > re-implementing the same concepts multiple times for each language and it > would be nice to share as much of the frontend lo

[clang] [clang][NFC] Fix some more incorrectly formatted comments (PR #138342)

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

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

2025-05-05 Thread Nick Sarnie via cfe-commits
sarnex wrote: > That change was reverted for different reasons. I shouldn't have changed the > prototype of _mm_prefetch there, so I'm relanding it here: > https://github.com/llvm/llvm-project/pull/138360 Thanks, my bad, I should have looked at the problem in more detail. > So, winnt.h is sup

[clang] [clang][NFC] Fix some more incorrectly formatted comments (PR #138342)

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

[clang] [clang][NFC] Fix some more incorrectly formatted comments (PR #138342)

2025-05-06 Thread Nick Sarnie via cfe-commits
@@ -4911,8 +4911,8 @@ std::optional Type::getNullability() const { bool Type::canHaveNullability(bool ResultIfUnknown) const { QualType type = getCanonicalTypeInternal(); + // We'll only see canonical types here. sarnex wrote: done in latest commit, thank

[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 created https://github.com/llvm/llvm-project/pull/137187 Based on feedback from https://github.com/llvm/llvm-project/pull/136753, remove the dummy values for OpenCL and make them match the zero default AS map. >From ebfc2c8dcdc819723ac2196d8362ffea5f91ec2f Mon Sep 17

[clang] [Clang][NFC] Move OffloadArch enum to a generic location (PR #137070)

2025-04-24 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex approved this pull request. https://github.com/llvm/llvm-project/pull/137070 ___ 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-25 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex converted_to_draft https://github.com/llvm/llvm-project/pull/136742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-25 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/137374 This reverts commit https://github.com/llvm/llvm-project/commit/de0153da325b21340747d8a064906a8c1c2f95ea. It breaks MSVC. >From 62328ab7fcaeea023b454b4e78fc6c7756439bf4 Mon Sep 17 00:00:00 2001 From: Nick Sarni

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

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

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

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

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

2025-04-25 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/137374 ___ 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-25 Thread Nick Sarnie via cfe-commits
sarnex wrote: FYI @mstorsjo I reverted the breaking change [here](https://github.com/llvm/llvm-project/commit/b60ee399787cb2a5f50d21932db3492cc4ff0d34), and I'll reapply it fixing the regression when I have a fix for it, sorry for the trouble. https://github.com/llvm/llvm-project/pull/136742

[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 updated https://github.com/llvm/llvm-project/pull/136753 >From e78694e52dfdcb6e2b085173952064a806d1d1a8 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 22 Apr 2025 12:57:36 -0700 Subject: [PATCH 1/2] [clang][SPIR-V] Addrspace of opencl_global should always be

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

2025-04-28 Thread Nick Sarnie via cfe-commits
sarnex wrote: Ping @AlexVlx @MrSidims thanks :) 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] [clang][SPIR-V] Fix OpenCL addrspace mapping when using non-zero default AS (PR #137187)

2025-04-28 Thread Nick Sarnie via cfe-commits
sarnex wrote: Probably yes, but I'd prefer to leave that to future work, I have enough on my plate :) https://github.com/llvm/llvm-project/pull/137187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

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

2025-04-28 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed 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] [clang][Sema] Don't warn for implicit uses of builtins in system headers (PR #138205)

2025-05-01 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/138205 Running CI >From c66ec11d8170a0e4c0b2fc50bdae039fd9c208fb Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 1 May 2025 14:47:45 -0700 Subject: [PATCH] [clang][Sema] Don't warn for implicit uses of builtin

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

2025-04-18 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 1/2] [clang][ARM] Define intrinsics guarded by __has_builtin on

[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 edited 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] [clang][OpenMP][SPIR-V] Fix addrspace of global constants (PR #134399)

2025-04-21 Thread Nick Sarnie via cfe-commits
sarnex wrote: Investigating now, thanks! 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][ARM][AArch64] Define intrinsics guarded by __has_builtin on all platforms (PR #128222)

2025-04-21 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed 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] Define intrinsics guarded by __has_builtin on all platforms (PR #128222)

2025-04-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] [clang][OpenMP][SPIR-V] Fix AS of globals and set the default AS to 4 (PR #135251)

2025-04-21 Thread Nick Sarnie via cfe-commits
sarnex wrote: @jhuber6 @AlexVlx Ping again on this one, it also fixes a regression in CUDA SPIRV, 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/l

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

2025-04-21 Thread Nick Sarnie via cfe-commits
sarnex wrote: This will be fixed by my existing PR https://github.com/llvm/llvm-project/pull/135251 I will add that test case and add you guys as reviewers, thanks and sorry for the trouble. https://github.com/llvm/llvm-project/pull/134399 ___ cfe-c

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

2025-04-21 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/135251 >From 675dde092c16a779d858f6082d0aab19acae3a1e Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 9 Apr 2025 08:42:49 -0700 Subject: [PATCH 1/2] [clang][OpenMP][SPIR-V] Fix addrspace of globals Signed-off-

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

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

2025-02-13 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] Disable RTTI for offloading at the frontend level (PR #127082)

2025-02-13 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex approved this pull request. thanks, nice cleanup https://github.com/llvm/llvm-project/pull/127082 ___ 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-13 Thread Nick Sarnie via cfe-commits
sarnex wrote: > GCC has __has_builtin, so how do they handle offloading targets? Do they have > the same odd behavior where __has_builtin returns true for builtins it cannot > actually emit code for? Setting up offloading for GCC was a nightmare, but it looks like the behavior is the same as

[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] [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

<    1   2   3   4   5   >