[libc-commits] [libc] 6009049 - [libc][NFC] Use LIBC_TARGET_IS_GPU instead of defining PACKAGE_FOR_GPU
Guillaume Chatelet via libc-commits
libc-commits at lists.llvm.org
Tue Feb 7 05:17:06 PST 2023
Author: Guillaume Chatelet
Date: 2023-02-07T13:16:52Z
New Revision: 600904907667dfd9f1058e725a38f802be990a0f
URL: https://github.com/llvm/llvm-project/commit/600904907667dfd9f1058e725a38f802be990a0f
DIFF: https://github.com/llvm/llvm-project/commit/600904907667dfd9f1058e725a38f802be990a0f.diff
LOG: [libc][NFC] Use LIBC_TARGET_IS_GPU instead of defining PACKAGE_FOR_GPU
Added:
Modified:
libc/src/__support/common.h
Removed:
################################################################################
diff --git a/libc/src/__support/common.h b/libc/src/__support/common.h
index 2aaa8f804c9a..333f897b6d53 100644
--- a/libc/src/__support/common.h
+++ b/libc/src/__support/common.h
@@ -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
@@ -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); \
More information about the libc-commits
mailing list