[libc-commits] [PATCH] D154704: [libc] Enable aliasing on AMDGPU targets

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jul 7 04:47:59 PDT 2023


jhuber6 created this revision.
jhuber6 added reviewers: sivachandra, lntue, michaelrj.
Herald added subscribers: libc-commits, jeroen.dobbelaere, tpr, dstuttard, yaxunl, kzhuravl.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.
Herald added subscribers: wangpc, wdng.

AMDGPU supports aliases now, so we can drop this case and leave it only
for the NVPTX target. Unfortunately it's unlikely that NVPTX will be
able to support this in the future due to their PTX language being very
limited.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154704

Files:
  libc/src/__support/common.h


Index: libc/src/__support/common.h
===================================================================
--- libc/src/__support/common.h
+++ libc/src/__support/common.h
@@ -16,8 +16,8 @@
 #define LLVM_LIBC_FUNCTION_ATTR
 #endif
 
-// GPU targets do not support aliasing.
-#if defined(LIBC_COPT_PUBLIC_PACKAGING) && defined(LIBC_TARGET_ARCH_IS_GPU)
+// The NVPTX target does not support aliasing.
+#if defined(LIBC_COPT_PUBLIC_PACKAGING) && defined(LIBC_TARGET_ARCH_IS_NVPTX)
 #define LLVM_LIBC_FUNCTION_IMPL(type, name, arglist)                           \
   LLVM_LIBC_FUNCTION_ATTR decltype(__llvm_libc::name)                          \
       __##name##_impl__ __asm__(#name);                                        \


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154704.538084.patch
Type: text/x-patch
Size: 719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230707/906b4984/attachment.bin>


More information about the libc-commits mailing list