9 Commits

Author SHA1 Message Date
David Peixotto
081a80f2b5
Fix build issues with libc mem* benchmarks (#115982)
Fix a few issues found when trying to build the benchmark:

Errors

1. Unable to find include "src/__support/macros/config.h" in
LibcMemoryBenchmarkMain.cpp

Warnings

2. Unused variable warning `Index` in MemorySizeDistributions.cpp
3. Fix deprecation warning for const-ref version of `DoNotOptimize`.
warning: 'DoNotOptimize<void *>' is deprecated: The const-ref version of
this method can permit undesired compiler optimizations in benchmarks
2024-11-14 11:10:11 -08:00
Kazu Hirata
b5516be056 [libc] Use std::optional instead of llvm::Optional (NFC)
This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2023-01-14 20:52:00 -08:00
Kazu Hirata
e1cdda57fa [libc] Use std::optional instead of llvm::Optional (NFC)
This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2023-01-14 20:22:48 -08:00
Schrodinger ZHU Yifan
12c62a6718 clean up std::iterator in LibcBenchmark.h
Reviewed By: gchatelet

Differential Revision: https://reviews.llvm.org/D135540
2022-10-23 10:33:45 +00:00
Simon Pilgrim
c2ab3d2c85 LibcBenchmark.h - add missing implicit cmath header dependency. NFCI.
Noticed while investigating if we can remove an unnecessary MathExtras.h include from SmallVector.h
2021-06-06 10:39:31 +01:00
Guillaume Chatelet
223a6f94c5 [libc] remove modulo from CircularArrayRef iterator 2021-01-06 12:03:52 +00:00
Guillaume Chatelet
deae7e982a [libc] revamp memory function benchmark
The benchmarking infrastructure can now run in two modes:
 - Sweep Mode: which generates a ramp of size values (same as before),
 - Distribution Mode: allows the user to select a distribution for the size paramater that is representative from production.

The analysis tool has also been updated to handle both modes.

Differential Revision: https://reviews.llvm.org/D93210
2020-12-17 13:23:33 +00:00
Chris Gyurgyik
d28f67292e
[libc] [obvious] Fix typographical error. 2020-08-14 08:34:42 -04:00
Siva Chandra Reddy
438f7fc068 [libc][benchmarks] Link the memory benchmark exes to functions from LLVM libc.
Summary:
To get the target order correct, the benchmarks directory has been moved
one level higher. Previously, it was living in the utils directory. The
utils directory is a collection of utils which are to be used by the
tests and implementations. However, benchmarks *use* the
implementations. So, moving it out of utils helps us setup proper
target level dependencies.

Reviewers: gchatelet

Differential Revision: https://reviews.llvm.org/D81910
2020-06-17 11:42:26 -07:00