[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 08:56:35 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 89a2e701596835ba2714e190990da09d4e976a9a 13adbd113d47dd18de72737a27c0251b9ac98513 -- libc/src/string/memory_utils/op_generic.h libc/src/string/memory_utils/utils.h libc/src/string/memory_utils/x86_64/inline_memcpy.h libc/src/string/memory_utils/x86_64/inline_memset.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/string/memory_utils/x86_64/inline_memset.h b/libc/src/string/memory_utils/x86_64/inline_memset.h
index c980a1cde7b3..41eadf2dcc00 100644
--- a/libc/src/string/memory_utils/x86_64/inline_memset.h
+++ b/libc/src/string/memory_utils/x86_64/inline_memset.h
@@ -66,7 +66,8 @@ inline_memset_x86_gt64_sw_prefetching(Ptr dst, uint8_t value, size_t count) {
size_t offset = 96;
while (offset + PREFETCH_DEGREE + SIZE <= count) {
prefetch_for_write(dst + offset + PREFETCH_DISTANCE);
- prefetch_for_write(dst + offset + PREFETCH_DISTANCE + x86::kOneCachelineSize);
+ prefetch_for_write(dst + offset + PREFETCH_DISTANCE +
+ x86::kOneCachelineSize);
for (size_t i = 0; i < PREFETCH_DEGREE; i += SIZE, offset += SIZE)
generic::Memset<uint256_t>::block(dst + offset, value);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/70857
More information about the llvm-commits
mailing list