UopsBenchmarkRunner.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. #ifndef LLVM_TOOLS_LLVM_EXEGESIS_UOPSBENCHMARKRUNNER_H
  14. #define LLVM_TOOLS_LLVM_EXEGESIS_UOPSBENCHMARKRUNNER_H
  15. #include "BenchmarkRunner.h"
  16. namespace llvm {
  17. namespace exegesis {
  18. class UopsBenchmarkRunner : public BenchmarkRunner {
  19. public:
  20. UopsBenchmarkRunner(const LLVMState &State,
  21. BenchmarkPhaseSelectorE BenchmarkPhaseSelector)
  22. : BenchmarkRunner(State, InstructionBenchmark::Uops,
  23. BenchmarkPhaseSelector) {}
  24. ~UopsBenchmarkRunner() override;
  25. static constexpr const size_t kMinNumDifferentAddresses = 6;
  26. private:
  27. Expected<std::vector<BenchmarkMeasure>>
  28. runMeasurements(const FunctionExecutor &Executor) const override;
  29. };
  30. } // namespace exegesis
  31. } // namespace llvm
  32. #endif // LLVM_TOOLS_LLVM_EXEGESIS_UOPSBENCHMARKRUNNER_H