[clang] [clang][AMDGPU][CUDA] Handle __builtin_printf for device printf (PR #68515)

2024-02-05 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/68515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AMDGPU][CUDA] Handle __builtin_printf for device printf (PR #68515)

2024-02-05 Thread Mészáros Gergely via cfe-commits
Maetveis wrote: I don't have commit access, @arsenm please merge. https://github.com/llvm/llvm-project/pull/68515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AMDGPU][CUDA] Handle __builtin_printf for device printf (PR #68515)

2024-02-05 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/68515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AMDGPU][CUDA] Handle __builtin_printf for device printf (PR #68515)

2024-02-05 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis updated https://github.com/llvm/llvm-project/pull/68515 From b7a87d012dfaa59ed8dc5478f798d2150141e028 Mon Sep 17 00:00:00 2001 From: Gergely Meszaros Date: Sun, 8 Oct 2023 09:30:24 + Subject: [PATCH] [clang][AMDGPU][CUDA] Handle __builtin_printf for device

[clang] [clang][AMDGPU][CUDA] Handle __builtin_printf for device printf (PR #68515)

2024-02-05 Thread Matt Arsenault via cfe-commits
arsenm wrote: > > It looks reasonable to me, although I'm not really an AMDGPU person. /me > > summons @arsenm ? > > AMDGPU backend relies on LLVM passes to translate printf at IR level. For the OpenCL case only, not for HIP/OpenMP https://github.com/llvm/llvm-project/pull/68515

[clang] [clang][AMDGPU][CUDA] Handle __builtin_printf for device printf (PR #68515)

2024-02-05 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,21 @@ +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -emit-llvm -disable-llvm-optzns -mprintf-kind=hostcall -fno-builtin-printf -fcuda-is-device \ +// RUN: -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa

[clang] [clang][AMDGPU][CUDA] Handle __builtin_printf for device printf (PR #68515)

2024-02-04 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > It looks reasonable to me, although I'm not really an AMDGPU person. /me > summons @arsenm ? AMDGPU backend relies on LLVM passes to translate printf at IR level. __builtin_printf and printf should be equivalent other than the name.

[clang] [clang][AMDGPU][CUDA] Handle __builtin_printf for device printf (PR #68515)

2024-02-04 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. LGTM. Thanks https://github.com/llvm/llvm-project/pull/68515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AMDGPU][CUDA] Handle __builtin_printf for device printf (PR #68515)

2024-02-03 Thread Justin Lebar via cfe-commits
jlebar wrote: It looks reasonable to me, although I'm not really an AMDGPU person. /me summons @arsenm ? https://github.com/llvm/llvm-project/pull/68515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][AMDGPU][CUDA] Handle __builtin_printf for device printf (PR #68515)

2024-02-03 Thread Mészáros Gergely via cfe-commits
Maetveis wrote: @jlebar @yxsamliu I don't know who could review this, but it is sitting here for quite some time unnoticed now, while being a simple enough change IMO. https://github.com/llvm/llvm-project/pull/68515 ___ cfe-commits mailing list

[clang] [clang][AMDGPU][CUDA] Handle __builtin_printf for device printf (PR #68515)

2023-10-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes Previously `__builtin_printf` would result to emitting call to `printf`, even though directly calling `printf` was translated. Ref: #68478 --- Full diff: https://github.com/llvm/llvm-project/pull/68515.diff 4 Files Affected: -

[clang] [clang][AMDGPU][CUDA] Handle __builtin_printf for device printf (PR #68515)

2023-10-08 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis created https://github.com/llvm/llvm-project/pull/68515 Previously `__builtin_printf` would result to emitting call to `printf`, even though directly calling `printf` was translated. Ref: #68478 From 193c652ac8a7a387ce99a63cd09b17bdc44f20a1 Mon Sep 17 00:00:00