aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2023-07-05 11:07:21 +0000
committerGuillaume Chatelet <gchatelet@google.com>2023-07-07 10:37:32 +0000
commitcb1468d3cbb7774332647dee3475d4e4f85c21e2 (patch)
treee60244949b3727c79a0da3edbcd3e7e303f8964d /clang/lib/Frontend/CompilerInvocation.cpp
parent4d847bf4d06589ff90648f3857ae73a12950d16c (diff)
downloadllvm-cb1468d3cbb7774332647dee3475d4e4f85c21e2.zip
llvm-cb1468d3cbb7774332647dee3475d4e4f85c21e2.tar.gz
llvm-cb1468d3cbb7774332647dee3475d4e4f85c21e2.tar.bz2
[libc] Adding a version of memcpy w/ software prefetching
For machines with a lot of cores, hardware prefetchers can saturate the memory bus when utilization is high. In this case it is desirable to turn off the hardware prefetcher completely. This has a big impact on the performance of memory functions such as `memcpy` that rely on the fact that the next cache line will be readily available. This patch adds the 'LIBC_COPT_MEMCPY_X86_USE_SOFTWARE_PREFETCHING' compile time option that generates a version of memcpy with software prefetching. While not fully restoring the original performances it mitigates the impact to an acceptable level. Reviewed By: rtenneti Differential Revision: https://reviews.llvm.org/D154494
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions