Skip to content

Commit

Permalink
[libc][NFC] Use LIBC_TARGET_IS_GPU instead of defining PACKAGE_FOR_GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
gchatelet committed Feb 7, 2023
1 parent 62c7f03 commit 6009049
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions libc/src/__support/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef LLVM_LIBC_SUPPORT_COMMON_H
#define LLVM_LIBC_SUPPORT_COMMON_H

#include "src/__support/macros/architectures.h"

#define LIBC_INLINE_ASM __asm__ __volatile__

#ifndef likely
Expand All @@ -29,12 +31,8 @@
#define LIBC_INLINE inline
#endif

#if defined(__AMDGPU__) || defined(__NVPTX__)
#define PACKAGE_FOR_GPU
#endif

// GPU targets do not support aliasing.
#if defined(LLVM_LIBC_PUBLIC_PACKAGING) && defined(PACKAGE_FOR_GPU)
#if defined(LLVM_LIBC_PUBLIC_PACKAGING) && defined(LIBC_TARGET_IS_GPU)
#define LLVM_LIBC_FUNCTION(type, name, arglist) \
LLVM_LIBC_FUNCTION_ATTR decltype(__llvm_libc::name) \
__##name##_impl__ __asm__(#name); \
Expand Down

0 comments on commit 6009049

Please sign in to comment.