[libc-commits] [libc] [libc][x86] Use prefetch for write for memcpy (PR #90450)
Clement Courbet via libc-commits
libc-commits at lists.llvm.org
Mon Apr 29 04:06:05 PDT 2024
================
@@ -69,14 +69,21 @@ inline_memcpy_x86_avx_ge64(Ptr __restrict dst, CPtr __restrict src,
return builtin::Memcpy<64>::loop_and_tail(dst, src, count);
}
+[[maybe_unused]] LIBC_INLINE void inline_memcpy_prefetch(Ptr __restrict dst,
+ CPtr __restrict src,
+ size_t distance) {
+ prefetch_to_local_cache(src + distance);
+ prefetch_for_write(dst + distance);
----------------
legrosbuffle wrote:
Should there be an option to turn that off ?
https://github.com/llvm/llvm-project/pull/90450
More information about the libc-commits
mailing list