[libc-commits] [libc] e74281a - [libc] Allow NVPTX to use aliases

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue Aug 8 06:59:44 PDT 2023


Author: Joseph Huber
Date: 2023-08-08T08:59:35-05:00
New Revision: e74281a3c3f8683f30d1fc62c9ac882b879b5edb

URL: https://github.com/llvm/llvm-project/commit/e74281a3c3f8683f30d1fc62c9ac882b879b5edb
DIFF: https://github.com/llvm/llvm-project/commit/e74281a3c3f8683f30d1fc62c9ac882b879b5edb.diff

LOG: [libc] Allow NVPTX to use aliases

Summrary:
Following D156014 we can now use aliases for NVPTX, removing this source
of divergence. We require at least +ptx63 and at least sm_30 for
`.alias` but this is already within what we build for with `libc`
support.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D157323

Added: 
    

Modified: 
    libc/src/__support/common.h

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/common.h b/libc/src/__support/common.h
index 9ec50b56901375..1cdd6fe1a515e6 100644
--- a/libc/src/__support/common.h
+++ b/libc/src/__support/common.h
@@ -16,14 +16,8 @@
 #define LLVM_LIBC_FUNCTION_ATTR
 #endif
 
-// 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);                                        \
-  type __##name##_impl__ arglist
 // MacOS needs to be excluded because it does not support aliasing.
-#elif defined(LIBC_COPT_PUBLIC_PACKAGING) && (!defined(__APPLE__))
+#if defined(LIBC_COPT_PUBLIC_PACKAGING) && (!defined(__APPLE__))
 #define LLVM_LIBC_FUNCTION_IMPL(type, name, arglist)                           \
   LLVM_LIBC_FUNCTION_ATTR decltype(__llvm_libc::name)                          \
       __##name##_impl__ __asm__(#name);                                        \


        


More information about the libc-commits mailing list