Miloš Stojanović | 24b7b99 | 2020-01-17 14:28:54 +0100 | [diff] [blame] | 1 | //===-- UopsBenchmarkRunner.h -----------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | /// |
| 9 | /// \file |
| 10 | /// A BenchmarkRunner implementation to measure uop decomposition. |
| 11 | /// |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_TOOLS_LLVM_EXEGESIS_UOPSBENCHMARKRUNNER_H |
| 15 | #define LLVM_TOOLS_LLVM_EXEGESIS_UOPSBENCHMARKRUNNER_H |
| 16 | |
| 17 | #include "BenchmarkRunner.h" |
| 18 | |
| 19 | namespace llvm { |
| 20 | namespace exegesis { |
| 21 | |
| 22 | class UopsBenchmarkRunner : public BenchmarkRunner { |
| 23 | public: |
| 24 | UopsBenchmarkRunner(const LLVMState &State) |
| 25 | : BenchmarkRunner(State, InstructionBenchmark::Uops) {} |
| 26 | ~UopsBenchmarkRunner() override; |
| 27 | |
| 28 | static constexpr const size_t kMinNumDifferentAddresses = 6; |
| 29 | |
| 30 | private: |
| 31 | Expected<std::vector<BenchmarkMeasure>> |
| 32 | runMeasurements(const FunctionExecutor &Executor) const override; |
| 33 | }; |
| 34 | |
| 35 | } // namespace exegesis |
| 36 | } // namespace llvm |
| 37 | |
| 38 | #endif // LLVM_TOOLS_LLVM_EXEGESIS_UOPSBENCHMARKRUNNER_H |