Allow SymbolUserOpInterface operators to be used in RemoveDeadValues Pass (#117405)
[llvm-project.git] / llvm / tools / llvm-exegesis / lib / LatencyBenchmarkRunner.h
blob6e21197b698b9fbd44b38543048bd930f901cf36
1 //===-- LatencyBenchmarkRunner.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 instruction latencies.
11 ///
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TOOLS_LLVM_EXEGESIS_LATENCY_H
15 #define LLVM_TOOLS_LLVM_EXEGESIS_LATENCY_H
17 #include "BenchmarkRunner.h"
18 #include "Target.h"
20 namespace llvm {
21 namespace exegesis {
23 class LatencyBenchmarkRunner : public BenchmarkRunner {
24 public:
25 LatencyBenchmarkRunner(const LLVMState &State, Benchmark::ModeE Mode,
26 BenchmarkPhaseSelectorE BenchmarkPhaseSelector,
27 Benchmark::ResultAggregationModeE ResultAggMode,
28 ExecutionModeE ExecutionMode,
29 ArrayRef<ValidationEvent> ValCounters,
30 unsigned BenchmarkRepeatCount);
31 ~LatencyBenchmarkRunner() override;
33 private:
34 Expected<std::vector<BenchmarkMeasure>>
35 runMeasurements(const FunctionExecutor &Executor) const override;
37 Benchmark::ResultAggregationModeE ResultAggMode;
38 unsigned NumMeasurements;
40 } // namespace exegesis
41 } // namespace llvm
43 #endif // LLVM_TOOLS_LLVM_EXEGESIS_LATENCY_H