Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / tools / llvm-exegesis / lib / LatencyBenchmarkRunner.h
blob34b912f0abded7cbdb1f9839634fac3b83c888a2
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"
19 namespace llvm {
20 namespace exegesis {
22 class LatencyBenchmarkRunner : public BenchmarkRunner {
23 public:
24 LatencyBenchmarkRunner(const LLVMState &State, Benchmark::ModeE Mode,
25 BenchmarkPhaseSelectorE BenchmarkPhaseSelector,
26 Benchmark::ResultAggregationModeE ResultAggMode,
27 ExecutionModeE ExecutionMode);
28 ~LatencyBenchmarkRunner() override;
30 private:
31 Expected<std::vector<BenchmarkMeasure>>
32 runMeasurements(const FunctionExecutor &Executor) const override;
34 Benchmark::ResultAggregationModeE ResultAggMode;
36 } // namespace exegesis
37 } // namespace llvm
39 #endif // LLVM_TOOLS_LLVM_EXEGESIS_LATENCY_H