[libc-commits] [PATCH] D145235: [libc] Add memcpy with software prefetcher

Matt D. via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Jun 21 11:50:45 PDT 2023


Matt added inline comments.


================
Comment at: libc/src/string/memory_utils/op_x86.h:50
 
+static constexpr size_t kCachelineSize = 64;
+
----------------
Perhaps you may be able to reuse the cache line information in the subtargets, e.g.,
- `CacheLineSize`, https://github.com/llvm/llvm-project/blob/d036bf071111001aadf3fc8cbbf058246046a62e/llvm/lib/Target/AArch64/AArch64Subtarget.cpp#L101
- exposed via `getCacheLineSize()`, https://github.com/llvm/llvm-project/blob/1ee4d880e8760256c606fe55b7af85a4f70d006d/llvm/lib/Target/AArch64/AArch64Subtarget.h#L234
- cf. `getCPUCacheLineSize` for X86, https://github.com/llvm/llvm-project/blob/1ee4d880e8760256c606fe55b7af85a4f70d006d/clang/lib/Basic/Targets/X86.cpp#L1376



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145235/new/

https://reviews.llvm.org/D145235



More information about the libc-commits mailing list