[libclc] [libclc] Declare workitem built-ins in clc, move ptx-nvidiacl workitem built-ins into clc (PR #144333)

2025-07-03 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > Perhaps we need a stripped down OpenCL header, like > `clc/opencl/opencl-base.h` which includes just the types and macro defs? See #146840 for an example of this approach. https://github.com/llvm/llvm-project/pull/144333 ___ cfe-

[libclc] [libclc] Make library output directories explicit (PR #146833)

2025-07-03 Thread Fraser Cormack via cfe-commits
@@ -120,14 +120,15 @@ function(link_bc) endif() add_custom_command( -OUTPUT ${ARG_TARGET}.bc -COMMAND ${llvm-link_exe} ${link_flags} -o ${ARG_TARGET}.bc ${LINK_INPUT_ARG} +OUTPUT ${LIBCLC_ARCH_OBJFILE_DIR}/${ARG_TARGET}.bc +COMMAND ${llvm-link_exe} ${link_

[libclc] [NFC][libclc] Replace and delete _CLC_DEFINE_UNARY/BINARY/TERNARY_BUILTIN macros (PR #145458)

2025-06-25 Thread Fraser Cormack via cfe-commits
@@ -0,0 +1,17 @@ +//===--===// +// +// 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] [NFC][libclc] Replace and delete _CLC_DEFINE_UNARY/BINARY/TERNARY_BUILTIN macros (PR #145458)

2025-06-25 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. Nice cleanup, thanks https://github.com/llvm/llvm-project/pull/145458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Add prepare- targets (PR #146700)

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

[libclc] [libclc] Add prepare- targets (PR #146700)

2025-07-03 Thread Fraser Cormack via cfe-commits
@@ -356,55 +356,72 @@ function(add_libclc_builtin_set) set( builtins_link_lib $ ) + # For SPIR-V targets we diverage at this point and generate SPIR-V using the + # llvm-spirv tool. if( ARG_ARCH STREQUAL spirv OR ARG_ARCH STREQUAL spirv64 ) -set( spv_suffix ${ARG_

[libclc] [libclc] Reduce include usage in OpenCL builtins (PR #146840)

2025-07-03 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/146840 This commit starts the process of reducing the amount of code included by OpenCL builtins, hopefully reducing build times in the process. It introduces a minimal OpenCL header - opencl-base.h - which includ

[libclc] [libclc] Add prepare- targets (PR #146700)

2025-07-02 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/146700 This target provides a unified build target for all devices under the single triple. This way a user doesn't have to know device names to build a specific target's bytecode libraries. Device names may be c

[libclc] [libclc] Declare workitem built-ins in clc, move ptx-nvidiacl workitem built-ins into clc (PR #144333)

2025-07-02 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: I am seeing unresolved CLC functions in `nvptx--.bc` and `nvptx64--.bc`. I think it's because we're now building things like `get_num_groups` for `nvptx`/`nvptx64`, whereas previously they were not being built for those targets. We're also not building `__clc_get_num_groups`

[libclc] [NFC][libclc] Refactor _CLC_*_VECTORIZE macros to functions in .inc files (PR #145678)

2025-06-26 Thread Fraser Cormack via cfe-commits
@@ -0,0 +1,121 @@ +//===--===// +// +// 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: Apa

[libclc] [libclc] Add generic implementation of some atomic functions in OpenCL spec section 6.15.12.7 (PR #146814)

2025-07-14 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck commented: Can we do anything about the warnings I'm seeing while building this? They're noisy. ``` In file included from /llvm-project/libclc/clc/lib/generic/atomic/clc_atomic_fetch_min.cl:18: In file included from /llvm-project/libclc/clc/include/clc/math/gent

[libclc] [libclc] Add generic implementation of some atomic functions in OpenCL spec section 6.15.12.7 (PR #146814)

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

[libclc] [NFC][libclc] Delete clc/include/clc/relational/floatn.inc (PR #149252)

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

[libclc] [libclc] Enable `clang fp reciprocal` in clc_native_divide/recip/rsqrt/tan (PR #149269)

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

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-01 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/146503 >From 2a701d8590d5ff347dbdcdf2cd734ffb056e8f13 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 30 Jun 2025 10:59:02 +0100 Subject: [PATCH 1/3] [libclc] Place libclc files in clang's resource dir --

[libclc] [libclc] Add missing clc_lgamma_r with generic address space pointer arg (PR #146495)

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

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-01 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/146503 >From 880db8564db982539166e5485dd0f0e8d6b08ca2 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 30 Jun 2025 10:59:02 +0100 Subject: [PATCH 1/4] [libclc] Place libclc files in clang's resource dir --

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-01 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/146503 >From 2a701d8590d5ff347dbdcdf2cd734ffb056e8f13 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 30 Jun 2025 10:59:02 +0100 Subject: [PATCH 1/4] [libclc] Place libclc files in clang's resource dir --

[libclc] [NFC][libclc] Refactor _CLC_*_VECTORIZE macros to functions in .inc files (PR #145678)

2025-06-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/145678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Add __clc_nan implementation with signed nancode argument (PR #146485)

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

[clang] [libclc] [llvm] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-01 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/146503 >From 880db8564db982539166e5485dd0f0e8d6b08ca2 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 30 Jun 2025 10:59:02 +0100 Subject: [PATCH 1/5] [libclc] Place libclc files in clang's resource dir --

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-01 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/146503 This commit adds driver support for linking libclc OpenCL libraries. It takes the form of a new optional flag: --libclc-lib=namespec. Nothing is linked unless this flag is specified. Not all libclc targets h

[libclc] [libclc] Add __clc_nan implementation with signed nancode argument (PR #146485)

2025-07-01 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. LGTM. I fixed a couple of minor typos in the description: `Specificatio` -> `Specification` and `no` -> `not`. I hope you don't mind. https://github.com/llvm/llvm-project/pull/146485 ___ cfe-

[libclc] [libclc] Fix installed symlinks to be relative again (PR #149728)

2025-07-21 Thread Fraser Cormack via cfe-commits
@@ -425,17 +425,21 @@ function(add_libclc_builtin_set) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) endif() - if(CMAKE_HOST_UNIX OR LLVM_USE_SYMLINKS) -set(LIBCLC_LINK_OR_COPY create_symlink) - else() -set(LIBCLC_LINK_OR_COPY copy) - endif() - foreach(

[libclc] [libclc] Fix installed symlinks to be relative again (PR #149728)

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

<    4   5   6   7   8   9