[clang] [clang][NFC][docs] Fix typo in LanguageExtensions (PR #121576)

2025-01-03 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a closed https://github.com/llvm/llvm-project/pull/121576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC][docs] Fix typo in LanguageExtensions (PR #121576)

2025-01-03 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a created https://github.com/llvm/llvm-project/pull/121576 None >From 67b8039fcd54adc2a599fcf6aa3f62ed8b348f3c Mon Sep 17 00:00:00 2001 From: Fabian Ritter Date: Fri, 3 Jan 2025 09:43:35 -0500 Subject: [PATCH] [clang][NFC][docs] Fix typo in LanguageExtensions ---

[clang] [Clang][HIP] Reapply: Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #115507)

2024-11-10 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a closed https://github.com/llvm/llvm-project/pull/115507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-11-08 Thread Fabian Ritter via cfe-commits
@@ -0,0 +1,111 @@ +// REQUIRES: amdgpu-registered-target +// RUN: %clang -xhip --offload-arch=gfx1030 --offload-host-only -pedantic -nogpuinc -nogpulib -nobuiltininc -fsyntax-only -Xclang -verify %s +// RUN: %clang -xhip --offload-arch=gfx1030 --offload-device-only -pedantic -no

[clang] [Clang][HIP] Reapply: Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #115507)

2024-11-08 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a created https://github.com/llvm/llvm-project/pull/115507 So far, these macros can be used in contexts where no meaningful wavefront size is available. We therefore deprecate these macros, to replace them with a more resilient interface to access wavefront size infor

[clang] Revert "[Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros" (PR #115499)

2024-11-08 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a closed https://github.com/llvm/llvm-project/pull/115499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros" (PR #115499)

2024-11-08 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a created https://github.com/llvm/llvm-project/pull/115499 Reverts llvm/llvm-project#112849 due to test failure on Mac, reported by @nico >From 4e1351cf2eb08cc4d8ba1ee5538d3a8e7cfa5aa8 Mon Sep 17 00:00:00 2001 From: Fabian Ritter Date: Fri, 8 Nov 2024 16:19:59 +010

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-11-08 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a closed https://github.com/llvm/llvm-project/pull/112849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-11-06 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: @AlexVlx @jhuber6 @arsenm is there a dependence between this deprecation PR and #114481, or can we already go ahead with the deprecation of the macro via this PR? https://github.com/llvm/llvm-project/pull/112849 ___ cfe-commits mai

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-10-29 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: > > > Should we move on with the deprecation of the macros with this PR then? > > > Please let me know if there are technical concerns remaining with the PR > > > or approve it so that it can land in trunk. > > > > > > CI is red but it seems to be some weird Windows failures

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-10-29 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a updated https://github.com/llvm/llvm-project/pull/112849 >From adcdba420a8ac96fa0b993b820aaa8b42b7d9632 Mon Sep 17 00:00:00 2001 From: Fabian Ritter Date: Fri, 18 Oct 2024 03:35:13 -0400 Subject: [PATCH 1/2] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-10-29 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: Should we move on with the deprecation of the macros with this PR then? Please let me know if there are technical concerns remaining with the PR or approve it so that it can land in trunk. https://github.com/llvm/llvm-project/pull/112849 __

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-10-21 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: > > Just a heads up, this change is gonna break some OpenMP tests, specifically > > those prefix with `ompx`. > > Just to clarify, adding the deprecation warning will break them, or the > eventual, as-of-yet not-scheduled, removal, will? On my system, the deprecation warning

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-10-21 Thread Fabian Ritter via cfe-commits
@@ -26,8 +27,14 @@ class MacroBuilder { MacroBuilder(raw_ostream &Output) : Out(Output) {} /// Append a \#define line for macro of the form "\#define Name Value\n". - void defineMacro(const Twine &Name, const Twine &Value = "1") { + /// If DeprecationMsg is provided, als

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-10-21 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a updated https://github.com/llvm/llvm-project/pull/112849 >From acbab11de650830ff94905cabb90f6a680552052 Mon Sep 17 00:00:00 2001 From: Fabian Ritter Date: Fri, 18 Oct 2024 03:35:13 -0400 Subject: [PATCH 1/2] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-10-18 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a created https://github.com/llvm/llvm-project/pull/112849 So far, these macros can be used in contexts where no meaningful wavefront size is available. We therefore deprecate these macros, to replace them with a more resilient interface to access wavefront size inf

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code without relying on target-dependent overload resolution (PR #109663)

2024-10-16 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a closed https://github.com/llvm/llvm-project/pull/109663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code without relying on target-dependent overload resolution (PR #109663)

2024-10-16 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: Closing this PR in favor of a more comprehensive treatment of the AMDGCN_WAVEFRONT_SIZE situation. https://github.com/llvm/llvm-project/pull/109663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code (PR #91478)

2024-10-16 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: Closing this PR in favor of a more comprehensive treatment of the AMDGCN_WAVEFRONT_SIZE situation. https://github.com/llvm/llvm-project/pull/91478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code (PR #91478)

2024-10-16 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a closed https://github.com/llvm/llvm-project/pull/91478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-10-16 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: Closing this PR in favor of a more comprehensive treatment of the AMDGCN_WAVEFRONT_SIZE situation. https://github.com/llvm/llvm-project/pull/103031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-10-16 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a closed https://github.com/llvm/llvm-project/pull/103031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Suppress availability diagnostics for mismatched host/device overloads (PR #93546)

2024-10-16 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: Closing this PR in favor of a more comprehensive treatment of the AMDGCN_WAVEFRONT_SIZE situation. https://github.com/llvm/llvm-project/pull/93546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [Clang][HIP] Suppress availability diagnostics for mismatched host/device overloads (PR #93546)

2024-10-16 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a closed https://github.com/llvm/llvm-project/pull/93546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code (PR #91478)

2024-10-07 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a updated https://github.com/llvm/llvm-project/pull/91478 >From 4145231fa662dc9324443e98209c8a7c61ed2ed9 Mon Sep 17 00:00:00 2001 From: Fabian Ritter Date: Tue, 7 May 2024 11:39:17 -0400 Subject: [PATCH] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code without relying on target-dependent overload resolution (PR #109663)

2024-10-02 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: @Artem-B thank you for the suggestion! Do I understand correctly that it boils down to the following? - If a (new) clang CLI option is set: enable PR #91478 - which, among other things, warns during host compilation whenever `__AMDGCN_WAVEFRONT_SIZE__` is used in template d

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code without relying on target-dependent overload resolution (PR #109663)

2024-09-30 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: Ping. https://github.com/llvm/llvm-project/pull/109663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code without relying on target-dependent overload resolution (PR #109663)

2024-09-30 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a edited https://github.com/llvm/llvm-project/pull/109663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code without relying on target-dependent overload resolution (PR #109663)

2024-09-30 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a edited https://github.com/llvm/llvm-project/pull/109663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-09-23 Thread Fabian Ritter via cfe-commits
@@ -0,0 +1,703 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only -verify=expected,onhost %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only -fcuda-is-device -verify=expected,ondevice %s + + +// Tests to ensure that functions with host and device

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code without relying on target-dependent overload resolution (PR #109663)

2024-09-23 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a created https://github.com/llvm/llvm-project/pull/109663 This is a proposal for an alternative to PR #91478 that would make PRs #93546 and #103031 unnecessary. Please let me know if this one is preferrable over PRs #91478 and #103031. The `__AMDGCN_WAVEFRONT_SIZE

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-09-10 Thread Fabian Ritter via cfe-commits
@@ -0,0 +1,703 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only -verify=expected,onhost %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only -fcuda-is-device -verify=expected,ondevice %s + + +// Tests to ensure that functions with host and device

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-09-03 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: Ping. https://github.com/llvm/llvm-project/pull/103031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-08-27 Thread Fabian Ritter via cfe-commits
@@ -0,0 +1,703 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only -verify=expected,onhost %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only -fcuda-is-device -verify=expected,ondevice %s + + +// Tests to ensure that functions with host and device

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-08-26 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: Ping. https://github.com/llvm/llvm-project/pull/103031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-08-19 Thread Fabian Ritter via cfe-commits
@@ -0,0 +1,703 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only -verify=expected,onhost %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only -fcuda-is-device -verify=expected,ondevice %s + + +// Tests to ensure that functions with host and device

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-08-19 Thread Fabian Ritter via cfe-commits
@@ -115,20 +143,65 @@ static bool hasAttr(const Decl *D, bool IgnoreImplicitAttr) { }); } +SemaCUDA::CUDATargetContext::CUDATargetContext(SemaCUDA *S, ritter-x2a wrote: Addressed in e273a996854cb3256cfeed832c3f16ff6fd0f534. https://github.com/llvm/

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-08-19 Thread Fabian Ritter via cfe-commits
@@ -9017,6 +9017,10 @@ def err_global_call_not_config : Error< def err_ref_bad_target : Error< "reference to %select{__device__|__global__|__host__|__host__ __device__}0 " "%select{function|variable}1 %2 in %select{__device__|__global__|__host__|__host__ __device__}3 funct

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-08-19 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a updated https://github.com/llvm/llvm-project/pull/103031 >From 274aaef1847bbdd837213064113adb1182e5bb59 Mon Sep 17 00:00:00 2001 From: Fabian Ritter Date: Tue, 13 Aug 2024 05:27:45 -0400 Subject: [PATCH 1/4] [Clang][HIP] Target-dependent overload resolution in dec

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-08-19 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a updated https://github.com/llvm/llvm-project/pull/103031 >From 274aaef1847bbdd837213064113adb1182e5bb59 Mon Sep 17 00:00:00 2001 From: Fabian Ritter Date: Tue, 13 Aug 2024 05:27:45 -0400 Subject: [PATCH 1/3] [Clang][HIP] Target-dependent overload resolution in dec

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-08-19 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a updated https://github.com/llvm/llvm-project/pull/103031 >From 274aaef1847bbdd837213064113adb1182e5bb59 Mon Sep 17 00:00:00 2001 From: Fabian Ritter Date: Tue, 13 Aug 2024 05:27:45 -0400 Subject: [PATCH 1/2] [Clang][HIP] Target-dependent overload resolution in dec

[clang] [Clang][HIP] Suppress availability diagnostics for mismatched host/device overloads (PR #93546)

2024-06-14 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: Ping @zygoloid, your input would be highly appreciated. Thanks! https://github.com/llvm/llvm-project/pull/93546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Suppress availability diagnostics for mismatched host/device overloads (PR #93546)

2024-06-05 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: Ping. https://github.com/llvm/llvm-project/pull/93546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Suppress availability diagnostics for mismatched host/device overloads (PR #93546)

2024-05-28 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: > If we are adding a special case for handling overloads, perhaps a better > approach would be to consider inferring the caller context from the > enveloping function declaration attributes, and allow overload resolution to > pick a device function instead. It would avoid the

[clang] [Clang][HIP] Suppress availability diagnostics for mismatched host/device overloads (PR #93546)

2024-05-28 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a created https://github.com/llvm/llvm-project/pull/93546 Outside of function bodies, the resolution of host/device overloads for functions in HIP/CUDA operates as if in a host-device context. This means that the device overload is used in the device compilation pha

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code (PR #91478)

2024-05-10 Thread Fabian Ritter via cfe-commits
@@ -0,0 +1,55 @@ +/*=== __clang_hip_device_macro_guards.h - guards for HIP device macros -=== + * + * 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: Apach

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code (PR #91478)

2024-05-08 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a created https://github.com/llvm/llvm-project/pull/91478 The `__AMDGCN_WAVEFRONT_SIZE` and `__AMDGCN_WAVEFRONT_SIZE__` macros in HIP can only provide meaningful values during device compilation. They are currently usable in host code, but only contain the default v