diff options
author | Joseph Huber <jhuber6@vols.utk.edu> | 2023-07-18 10:48:31 -0500 |
---|---|---|
committer | Joseph Huber <jhuber6@vols.utk.edu> | 2023-07-18 10:49:51 -0500 |
commit | eca8b54a5f76c65a055bac05556b70c2a0ec63a1 (patch) | |
tree | a0528a539606bd834d147039bcb3917538e353e0 /libc | |
parent | 37937b8a040c5525a92c7ce23c329383e9d0c8e4 (diff) | |
download | llvm-eca8b54a5f76c65a055bac05556b70c2a0ec63a1.zip llvm-eca8b54a5f76c65a055bac05556b70c2a0ec63a1.tar.gz llvm-eca8b54a5f76c65a055bac05556b70c2a0ec63a1.tar.bz2 |
[libc] Default the GPU build to the default memory utilities
A previous patch made this cause an error on the GPU. We have not yet
dedicated time towards an optimial implementaiton there but we do not
want it to cause an error. We simply use the fallback routines.
Differential Revision: https://reviews.llvm.org/D155615
Diffstat (limited to 'libc')
5 files changed, 10 insertions, 0 deletions
diff --git a/libc/src/string/memory_utils/bcmp_implementations.h b/libc/src/string/memory_utils/bcmp_implementations.h index bfd5201..4b676e4 100644 --- a/libc/src/string/memory_utils/bcmp_implementations.h +++ b/libc/src/string/memory_utils/bcmp_implementations.h @@ -23,6 +23,8 @@ #elif defined(LIBC_TARGET_ARCH_IS_ANY_RISCV) #include "src/string/memory_utils/riscv/bcmp_implementations.h" #define LIBC_SRC_STRING_MEMORY_UTILS_BCMP inline_bcmp_riscv +#elif defined(LIBC_TARGET_ARCH_IS_GPU) +// TODO: Define a more optimal GPU impolementation. #else // We may want to error instead of defaulting to suboptimal implementation. #include "src/string/memory_utils/generic/byte_per_byte.h" diff --git a/libc/src/string/memory_utils/memcmp_implementations.h b/libc/src/string/memory_utils/memcmp_implementations.h index e18e640..95889c5 100644 --- a/libc/src/string/memory_utils/memcmp_implementations.h +++ b/libc/src/string/memory_utils/memcmp_implementations.h @@ -24,6 +24,8 @@ #elif defined(LIBC_TARGET_ARCH_IS_ANY_RISCV) #include "src/string/memory_utils/riscv/memcmp_implementations.h" #define LIBC_SRC_STRING_MEMORY_UTILS_MEMCMP inline_memcmp_riscv +#elif defined(LIBC_TARGET_ARCH_IS_GPU) +// TODO: Define a more optimal GPU impolementation. #else // We may want to error instead of defaulting to suboptimal implementation. #include "src/string/memory_utils/generic/byte_per_byte.h" diff --git a/libc/src/string/memory_utils/memcpy_implementations.h b/libc/src/string/memory_utils/memcpy_implementations.h index 657fbac..4e59230 100644 --- a/libc/src/string/memory_utils/memcpy_implementations.h +++ b/libc/src/string/memory_utils/memcpy_implementations.h @@ -28,6 +28,8 @@ #elif defined(LIBC_TARGET_ARCH_IS_ANY_RISCV) #include "src/string/memory_utils/riscv/memcpy_implementations.h" #define LIBC_SRC_STRING_MEMORY_UTILS_MEMCPY inline_memcpy_riscv +#elif defined(LIBC_TARGET_ARCH_IS_GPU) +// TODO: Define a more optimal GPU impolementation. #else // We may want to error instead of defaulting to suboptimal implementation. #include "src/string/memory_utils/generic/byte_per_byte.h" diff --git a/libc/src/string/memory_utils/memmove_implementations.h b/libc/src/string/memory_utils/memmove_implementations.h index 78ae7a8..764ed66 100644 --- a/libc/src/string/memory_utils/memmove_implementations.h +++ b/libc/src/string/memory_utils/memmove_implementations.h @@ -20,6 +20,8 @@ #elif defined(LIBC_TARGET_ARCH_IS_ANY_RISCV) #include "src/string/memory_utils/riscv/memmove_implementations.h" #define LIBC_SRC_STRING_MEMORY_UTILS_MEMMOVE inline_memmove_riscv +#elif defined(LIBC_TARGET_ARCH_IS_GPU) +// TODO: Define a more optimal GPU impolementation. #else // We may want to error instead of defaulting to suboptimal implementation. #include "src/string/memory_utils/generic/byte_per_byte.h" diff --git a/libc/src/string/memory_utils/memset_implementations.h b/libc/src/string/memory_utils/memset_implementations.h index 37ceff9..bb9317c 100644 --- a/libc/src/string/memory_utils/memset_implementations.h +++ b/libc/src/string/memory_utils/memset_implementations.h @@ -24,6 +24,8 @@ #elif defined(LIBC_TARGET_ARCH_IS_ANY_RISCV) #include "src/string/memory_utils/riscv/memset_implementations.h" #define LIBC_SRC_STRING_MEMORY_UTILS_MEMSET inline_memset_riscv +#elif defined(LIBC_TARGET_ARCH_IS_GPU) +// TODO: Define a more optimal GPU impolementation. #else // We may want to error instead of defaulting to suboptimal implementation. #include "src/string/memory_utils/generic/byte_per_byte.h" |