[libc-commits] [PATCH] D88271: [libc] Using llvm_libc memcpy in mem* benchmarks.
Anthony Steinhauser via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Sep 24 17:11:04 PDT 2020
asteinhauser created this revision.
asteinhauser added a reviewer: sivachandra.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added a project: libc-project.
asteinhauser requested review of this revision.
Currently the mem* benchmarks use memcpy from Glibc and memset from LLVM libc.
That's misleading and produces inconsistent results and behaviors.
This change makes Memcpy.cpp consistent with Memset.cpp:
https://github.com/llvm/llvm-project/blob/master/libc/benchmarks/Memset.cpp#L49
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D88271
Files:
libc/benchmarks/Memcpy.cpp
Index: libc/benchmarks/Memcpy.cpp
===================================================================
--- libc/benchmarks/Memcpy.cpp
+++ libc/benchmarks/Memcpy.cpp
@@ -48,8 +48,8 @@
BenchmarkResult benchmark(const BenchmarkOptions &Options,
StringRef FunctionName, size_t Size) override {
- FunctionPrototype Function =
- StringSwitch<FunctionPrototype>(FunctionName).Case("memcpy", &::memcpy);
+ FunctionPrototype Function = StringSwitch<FunctionPrototype>(FunctionName)
+ .Case("memcpy", &__llvm_libc::memcpy);
return llvm::libc_benchmarks::benchmark(
Options, PP, [this, Function, Size](ParameterType p) {
Function(DstBuffer + p.DstOffset, SrcBuffer + p.SrcOffset, Size);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88271.294205.patch
Type: text/x-patch
Size: 783 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200925/9d000093/attachment.bin>
More information about the libc-commits
mailing list