[RISCV] Eliminate dead li after emitting VSETVLIs (#65934)
[llvm-project.git] / llvm / tools / llvm-exegesis / lib / UopsBenchmarkRunner.h
blob337f0936701225be094982c0ffb004124a8769fd
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"
19 namespace llvm {
20 namespace exegesis {
22 class UopsBenchmarkRunner : public BenchmarkRunner {
23 public:
24 UopsBenchmarkRunner(const LLVMState &State,
25 BenchmarkPhaseSelectorE BenchmarkPhaseSelector,
26 ExecutionModeE ExecutionMode)
27 : BenchmarkRunner(State, Benchmark::Uops, BenchmarkPhaseSelector,
28 ExecutionMode) {}
29 ~UopsBenchmarkRunner() override;
31 static constexpr const size_t kMinNumDifferentAddresses = 6;
33 private:
34 Expected<std::vector<BenchmarkMeasure>>
35 runMeasurements(const FunctionExecutor &Executor) const override;
38 } // namespace exegesis
39 } // namespace llvm
41 #endif // LLVM_TOOLS_LLVM_EXEGESIS_UOPSBENCHMARKRUNNER_H