[llvm] [libc] [libc] Adding a version of memset with software prefetching (PR #70857)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 8 09:34:59 PST 2023
================
@@ -48,6 +48,13 @@ using generic_v256 = uint8_t __attribute__((__vector_size__(32)));
using generic_v512 = uint8_t __attribute__((__vector_size__(64)));
} // namespace LIBC_NAMESPACE
+namespace LIBC_NAMESPACE::sw_prefetch {
+// Size of a cacheline for software prefetching
+static constexpr size_t kCachelineSize = 64;
+// prefetch for write
+static inline void PrefetchW(CPtr dst) { __builtin_prefetch(dst, 1, 3); }
+} // namespace LIBC_NAMESPACE::sw_prefetch
+
----------------
doshimili wrote:
Sorry, removed now
https://github.com/llvm/llvm-project/pull/70857
More information about the llvm-commits
mailing list