Skip to content

Commit

Permalink
[libc] Allow NVPTX to use aliases
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jhuber6 committed Aug 8, 2023
1 parent 247cc26 commit e74281a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions libc/src/__support/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand Down

0 comments on commit e74281a

Please sign in to comment.