[libclc] [libclc] Build for OpenCL 3.0 (PR #135733)

2025-04-23 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: See #136871 for a fix for the CI issues. https://github.com/llvm/llvm-project/pull/135733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Re-enable compiler warning (PR #136872)

2025-04-23 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/136872 libclc is now clean of code that triggers the bitwise-conditional-parentheses warning, so we can finally remove the workaround. >From 1811e6ee0fb4c3af60a245418816b1e5a63163b2 Mon Sep 17 00:00:00 2001 From:

[libclc] [libclc] Fix unguarded use of image types (PR #136871)

2025-04-23 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: CC @wenju-he https://github.com/llvm/llvm-project/pull/136871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Fix unguarded use of image types (PR #136871)

2025-04-23 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/136871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Re-enable compiler warning (PR #136872)

2025-04-23 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/136872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Build for OpenCL 3.0 (PR #135733)

2025-04-23 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. https://github.com/llvm/llvm-project/pull/135733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move fmin & fmax to CLC library (PR #134218)

2025-04-23 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: ping https://github.com/llvm/llvm-project/pull/134218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Clean up unnecessary #undef __CLC_BODYs (PR #137959)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/137959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Clean up unnecessary #undef __CLC_BODYs (PR #137959)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/137959 >From ef6433ffa32a8f4ced865382bfd45de61f5aef53 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Wed, 30 Apr 2025 13:48:16 +0100 Subject: [PATCH 1/2] [libclc] Clean up unnecessary #undef __CLC_BODYs This

[libclc] [libclc] Move minmag & maxmag to the CLC library (PR #137982)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/137982 None >From d2eea7bc2f2332d4c8b7d28f3512ab67a03f6360 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Wed, 30 Apr 2025 16:59:06 +0100 Subject: [PATCH] [libclc] Move minmag & maxmag to the CLC library ---

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

2025-04-30 Thread Fraser Cormack via cfe-commits
@@ -9,15 +9,31 @@ #define __CLC_DST_ADDR_SPACE local #define __CLC_SRC_ADDR_SPACE global #define __CLC_BODY -#include +#include +#undef __CLC_DST_ADDR_SPACE frasercrmck wrote: We probably don't need to `undef` and re-`define` here, when `local/global` isn'

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/137932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. Thanks. We could probably come up with some kind of combined `gentype.inc` that does them both at once (though both currently `undef` `__CLC_BODY` after they finish so we'd need to be able to stop that, or preserve `__CLC_BODY` across

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. LGTM. I see there's a note in the spec: `async_work_group_copy and async_work_group_strided_copy for 3-component vector types behave as async_work_group_copy and async_work_group_strided_copy respectively for 4-component vector types.

[clang] [NVPTX] Support the OpenCL generic addrspace feature by default (PR #137940)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/137940 As best as I can see, all NVPTX architectures support the generic address space. I note there's a FIXME in the target's address space map about 'generic' still having to be added to the target but we haven'

[libclc] [libclc] Clean up unnecessary #undef __CLC_BODYs (PR #137959)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/137959 This macro is automatically undefined by the various gentype-like helpers. >From ef6433ffa32a8f4ced865382bfd45de61f5aef53 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Wed, 30 Apr 2025 13:48:16 +0100

[libclc] [libclc] Clean up unnecessary #undef __CLC_BODYs (PR #137959)

2025-04-30 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: CC @wenju-he https://github.com/llvm/llvm-project/pull/137959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Support the generic address space (PR #137183)

2025-04-30 Thread Fraser Cormack via cfe-commits
@@ -23,4 +23,20 @@ #define _CLC_DEF __attribute__((always_inline)) #endif +#if __OPENCL_C_VERSION__ == CL_VERSION_2_0 || \ +(__OPENCL_C_VERSION__ >= CL_VERSION_3_0 && \ + defined(__opencl_c_generic_addr

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/137932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] 1180740 - [libclc][NFC] Remove unused integer-gentype.inc

2025-04-30 Thread Fraser Cormack via cfe-commits
Author: Fraser Cormack Date: 2025-04-30T13:39:23+01:00 New Revision: 1180740ced0218865577a09c9245f035e443a6f0 URL: https://github.com/llvm/llvm-project/commit/1180740ced0218865577a09c9245f035e443a6f0 DIFF: https://github.com/llvm/llvm-project/commit/1180740ced0218865577a09c9245f035e443a6f0.diff

[libclc] [libclc] Remove unnecessary clcmacros.h (PR #137149)

2025-04-24 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/137149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Remove unnecessary clcmacros.h (PR #137149)

2025-04-24 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/137149 The macros defined by this file (not to be confused with clcmacro.h) don't appear necessary for building libclc. The language version macros should be handled by clang, and there are no uses of NULL or ker

[libclc] 2edade2 - [libclc][NFC] Clang-format vload/vstore code

2025-04-24 Thread Fraser Cormack via cfe-commits
Author: Fraser Cormack Date: 2025-04-24T11:42:18+01:00 New Revision: 2edade28245b1fc2b7cb0b39804894f8fdcfb7ff URL: https://github.com/llvm/llvm-project/commit/2edade28245b1fc2b7cb0b39804894f8fdcfb7ff DIFF: https://github.com/llvm/llvm-project/commit/2edade28245b1fc2b7cb0b39804894f8fdcfb7ff.diff

[libclc] [libclc] only check filename part of the source for avoiding duplication (PR #135710)

2025-04-23 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > > I would like to further investigate weak linkage as another means of > > overriding specific builtins down to a finer granularity. That approach > > might warrant another method of file discovery. > > It would bring unnecessary builds and may increase build time. Filenam

[libclc] [libclc] only check filename part of the source for avoiding duplication (PR #135710)

2025-04-23 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/135710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Support the generic address space (PR #137183)

2025-04-24 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > There is a clang bug if there is different mangling. The itanium mangling > should be coming from the source type / original address space, not whatever > IR address space value that happens to map to Yeah, that would be nice but this is what's happening, I'm afraid. It i

[clang] [AMDGPU] Support the OpenCL generic addrspace feature by default (PR #137636)

2025-04-28 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/137636 This feature should be supported on AMDGCN architectures with flat addressing. >From bfaf6b32f88c0439b5f70a5fa78fc0927307ecce Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 28 Apr 2025 15:06:58 +0

[clang] [AMDGPU] Support the OpenCL generic addrspace feature by default (PR #137636)

2025-04-28 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/137636 >From bfaf6b32f88c0439b5f70a5fa78fc0927307ecce Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 28 Apr 2025 15:06:58 +0100 Subject: [PATCH 1/2] [AMDGPU] Support the OpenCL generic addrspace feature b

[libclc] [libclc] Support the generic address space (PR #137183)

2025-04-28 Thread Fraser Cormack via cfe-commits
@@ -23,4 +23,20 @@ #define _CLC_DEF __attribute__((always_inline)) #endif +#if __OPENCL_C_VERSION__ == CL_VERSION_2_0 || \ +(__OPENCL_C_VERSION__ >= CL_VERSION_3_0 && \ + defined(__opencl_c_generic_addr

[libclc] [libclc] Support the generic address space (PR #137183)

2025-04-28 Thread Fraser Cormack via cfe-commits
@@ -420,12 +420,37 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) -D${CLC_TARGET_DEFINE} # All libclc builtin libraries see CLC headers -I${CMAKE_CURRENT_SOURCE_DIR}/clc/include + # Error on undefined macros + -Werror=undef ) if( NOT "${cpu}"

[libclc] [libclc] Support the generic address space (PR #137183)

2025-04-28 Thread Fraser Cormack via cfe-commits
@@ -12,3 +12,7 @@ _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x, local __CLC_INTN *iptr); _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,

[libclc] [libclc] Support the generic address space (PR #137183)

2025-04-28 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/137183 >From 3519e1c571375802d77937e765d551607ed5bdde Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Thu, 24 Apr 2025 11:24:30 +0100 Subject: [PATCH 1/2] [libclc] Support the generic address space This commit

[libclc] [libclc] Move fmin & fmax to CLC library (PR #134218)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/134218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move fmin & fmax to CLC library (PR #134218)

2025-04-29 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: I'll merge this as it's just a code move and there's no change to codegen. https://github.com/llvm/llvm-project/pull/134218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[libclc] [libclc] Move fract to the CLC library (PR #137785)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/137785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Support the OpenCL generic addrspace feature by default (PR #137636)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/137636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc][NFC] Remove unary_builtin.inc (PR #137656)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/137656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move fract to the CLC library (PR #137785)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/137785 >From f9a265e0d9bcecb80d25b97c394d7b9aa68d27ea Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Tue, 29 Apr 2025 11:43:00 +0100 Subject: [PATCH 1/2] [libclc] Move fract to the CLC library The builtin was

[libclc] [libclc] Move fract to the CLC library (PR #137785)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/137785 The builtin was already vectorized so there's no difference to codegen for non-SPIR-V targets. >From f9a265e0d9bcecb80d25b97c394d7b9aa68d27ea Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Tue, 29 Apr

[libclc] [libclc] Move fdim to CLC library; simplify (PR #137811)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/137811 This commit moves the fdim builtin to the CLC library. It simultaneously simplifies the codegen, unifying it between scalar and vector and avoiding bithacking for vector types. >From a20d00150430c7e5c24b69

[libclc] [libclc] Move fmin/fmax to the CLC library (PR #128506)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/128506 >From 5c367b8c87bf07f851778f391e5130a0fd0b193b Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 24 Feb 2025 12:25:22 + Subject: [PATCH] [libclc] Optimize generic CLC fmin/fmax The CLC fmin/fmax

[libclc] [libclc] Optimize generic CLC fmin/fmax (PR #128506)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/128506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Optimize generic CLC fmin/fmax (PR #128506)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/128506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move fdim to CLC library; simplify (PR #137811)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/137811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Support the generic address space (PR #137183)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/137183 >From 253bbc8cf673dd1d0ca606058dbd26e15cee651a Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Thu, 24 Apr 2025 11:24:30 +0100 Subject: [PATCH 1/2] [libclc] Support the generic address space This commit

[libclc] 6ffccea - [libclc][NFC] Remove binary_decl_tt.inc

2025-04-29 Thread Fraser Cormack via cfe-commits
Author: Fraser Cormack Date: 2025-04-29T15:48:46+01:00 New Revision: 6ffccea1c2b804d530c0f7bf3cc92db42b4432c5 URL: https://github.com/llvm/llvm-project/commit/6ffccea1c2b804d530c0f7bf3cc92db42b4432c5 DIFF: https://github.com/llvm/llvm-project/commit/6ffccea1c2b804d530c0f7bf3cc92db42b4432c5.diff

[libclc] [libclc] Avoid casting NANs & literals to 'gentype' (PR #137824)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/137824 By having these already defined as type 'gentype' we can avoid unnecessary casting. >From 662f8881d3da88714231b9a232a6006ae834b3b7 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Tue, 29 Apr 2025 16:05

[libclc] [libclc] Avoid casting NANs & literals to 'gentype' (PR #137824)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/137824 >From abb52892c044ca1883cc41d97c3edf08aafc9746 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Tue, 29 Apr 2025 16:05:19 +0100 Subject: [PATCH] [libclc] Avoid casting NANs & literals to 'gentype' By hav

[libclc] [libclc] Avoid casting NANs & literals to 'gentype' (PR #137824)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/137824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move minmag & maxmag to the CLC library (PR #137982)

2025-05-01 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/137982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move minmag & maxmag to the CLC library (PR #137982)

2025-05-01 Thread Fraser Cormack via cfe-commits
@@ -0,0 +1,18 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[libclc] c5b750f - [libclc] Move log2/log10 tables to CLC tables impl

2025-05-01 Thread Fraser Cormack via cfe-commits
Author: Fraser Cormack Date: 2025-05-01T10:23:28+01:00 New Revision: c5b750f5af72fadd4c00c120c9c585240da466b4 URL: https://github.com/llvm/llvm-project/commit/c5b750f5af72fadd4c00c120c9c585240da466b4 DIFF: https://github.com/llvm/llvm-project/commit/c5b750f5af72fadd4c00c120c9c585240da466b4.diff

<    2   3   4   5   6   7