forked from OSchip/llvm-project
[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:
parent
7db7a35545
commit
ef36e8380a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue