[libc] Using llvm_libc memcpy in mem* benchmarks.

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

Reviewers: sivachandra

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D88271
This commit is contained in:
Anthony Steinhauser 2020-09-24 22:03:52 -07:00
parent 7db7a35545
commit ef36e8380a
1 changed files with 2 additions and 2 deletions

View File

@ -48,8 +48,8 @@ struct MemcpyContext : public BenchmarkRunner {
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);