[llvm] [libc] [libc] Adding a version of memset with software prefetching (PR #70857)

Guillaume Chatelet via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 06:55:22 PST 2023


================
@@ -374,6 +374,12 @@ template <size_t SIZE> struct AlignHelper {
   uintptr_t offset_;
 };
 
+LIBC_INLINE void prefetch_for_write(CPtr dst) { __builtin_prefetch(dst, 1, 3); }
----------------
gchatelet wrote:

Can you add inline comments to like so:
```
__builtin_prefetch(dst, /*write*/ 1, /*max locality*/ 3);
```
same below.

https://github.com/llvm/llvm-project/pull/70857


More information about the llvm-commits mailing list