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

2025-04-14 Thread Reid Kleckner via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + rnk wrote: > If we have to define them on non-windows targets anyways, perhaps a better > fix is to let clang define them everywhere, and avoid this special case in > the headers. Yes, we

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

2025-03-26 Thread Artem Belevich via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + Artem-B wrote: @rnk Reid, would you happen to have an idea what's up with these builtins on Windows? https://github.com/llvm/llvm-project/pull/128222 __

[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] [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][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 Artem Belevich via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + Artem-B wrote: ``` #if __CUDA_ARCH__ // Make sure the declarations here are in sync with the functions provided under #else. #else #endif ``` https://github.com/llvm/llvm-project/pull/1

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

2025-02-21 Thread Artem Belevich via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + Artem-B wrote: I'm actually wondering if the header needs `__has_builtin()`... They are coming from the same compiler, and, if they are missing, they are declared in terms of `__builtin*()

[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 Artem Belevich via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + Artem-B wrote: Unfortunately, this will be observable to any code that happens to need those builtins, and they are actually not provided by the compiler (i.e. `__has_builtin(__wfi)` would

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

2025-02-21 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Maybe a comment for why we need to check for the CUDA arch, but I'll defer to @Artem-B for the final +1. https://github.com/llvm/llvm-project/pull/128222 ___ cfe-commits mailing list cfe-commits@l

[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
@@ -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 Joseph Huber via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA__) jhuber6 wrote: We'd want this to compile for the CUDA host, you should be able to check `__CUDA_ARCH__` for the CUDA device only. 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 via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nick Sarnie (sarnex) Changes Apply a preemptive workaround for a possible behavior change in `__has_builtin` as suggested in https://github.com/llvm/llvm-project/pull/121839 and https://github.com/llvm/llvm-project/pull/126324. --- Full

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

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Nick Sarnie (sarnex) Changes Apply a preemptive workaround for a possible behavior change in `__has_builtin` as suggested in https://github.com/llvm/llvm-project/pull/121839 and https://github.com/llvm/llvm-project/pull/126324. ---

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