[libc-commits] [libc] ddfabef - [libc] Conform memcpy tuning macro to the new naming scheme
Guillaume Chatelet via libc-commits
libc-commits at lists.llvm.org
Tue Feb 14 05:44:19 PST 2023
Author: Guillaume Chatelet
Date: 2023-02-14T13:44:11Z
New Revision: ddfabefe1be154acf9111f7ca19b2a6651b93c31
URL: https://github.com/llvm/llvm-project/commit/ddfabefe1be154acf9111f7ca19b2a6651b93c31
DIFF: https://github.com/llvm/llvm-project/commit/ddfabefe1be154acf9111f7ca19b2a6651b93c31.diff
LOG: [libc] Conform memcpy tuning macro to the new naming scheme
Added:
Modified:
libc/src/string/memory_utils/memcpy_implementations.h
Removed:
################################################################################
diff --git a/libc/src/string/memory_utils/memcpy_implementations.h b/libc/src/string/memory_utils/memcpy_implementations.h
index c9c52527e2060..9ff71ab1a54c5 100644
--- a/libc/src/string/memory_utils/memcpy_implementations.h
+++ b/libc/src/string/memory_utils/memcpy_implementations.h
@@ -66,16 +66,20 @@ inline_memcpy_x86_maybe_interpose_repmovsb(Ptr __restrict dst,
CPtr __restrict src, size_t count) {
// Whether to use rep;movsb exclusively, not at all, or only above a certain
// threshold.
-#ifndef LLVM_LIBC_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE
-#define LLVM_LIBC_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE -1
+#ifndef LIBC_COPT_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE
+#define LIBC_COPT_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE -1
#endif
#ifdef LLVM_LIBC_MEMCPY_X86_USE_ONLY_REPMOVSB
-#error LLVM_LIBC_MEMCPY_X86_USE_ONLY_REPMOVSB is deprecated use LLVM_LIBC_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE=0 instead.
+#error LLVM_LIBC_MEMCPY_X86_USE_ONLY_REPMOVSB is deprecated use LIBC_COPT_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE=0 instead.
#endif // LLVM_LIBC_MEMCPY_X86_USE_ONLY_REPMOVSB
+#ifdef LLVM_LIBC_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE
+#error LLVM_LIBC_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE is deprecated use LIBC_COPT_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE=0 instead.
+#endif // LLVM_LIBC_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE
+
static constexpr size_t kRepMovsbThreshold =
- LLVM_LIBC_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE;
+ LIBC_COPT_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE;
if constexpr (kRepMovsbThreshold == 0) {
return x86::Memcpy::repmovsb(dst, src, count);
} else if constexpr (kRepMovsbThreshold == size_t(-1)) {
More information about the libc-commits
mailing list