Allow SymbolUserOpInterface operators to be used in RemoveDeadValues Pass (#117405)
[llvm-project.git] / llvm / tools / llvm-exegesis / lib / UopsBenchmarkRunner.h
blobef47b7fe8a655ec6487133c9ff463da4553635e5
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 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TOOLS_LLVM_EXEGESIS_UOPSBENCHMARKRUNNER_H
15 #define LLVM_TOOLS_LLVM_EXEGESIS_UOPSBENCHMARKRUNNER_H
17 #include "BenchmarkRunner.h"
18 #include "Target.h"
20 namespace llvm {
21 namespace exegesis {
23 class UopsBenchmarkRunner : public BenchmarkRunner {
24 public:
25 UopsBenchmarkRunner(const LLVMState &State,
26 BenchmarkPhaseSelectorE BenchmarkPhaseSelector,
27 ExecutionModeE ExecutionMode,
28 ArrayRef<ValidationEvent> ValCounters)
29 : BenchmarkRunner(State, Benchmark::Uops, BenchmarkPhaseSelector,
30 ExecutionMode, ValCounters) {}
31 ~UopsBenchmarkRunner() override;
33 static constexpr const size_t kMinNumDifferentAddresses = 6;
35 private:
36 Expected<std::vector<BenchmarkMeasure>>
37 runMeasurements(const FunctionExecutor &Executor) const override;
40 } // namespace exegesis
41 } // namespace llvm
43 #endif // LLVM_TOOLS_LLVM_EXEGESIS_UOPSBENCHMARKRUNNER_H