UopsBenchmarkRunner.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. : BenchmarkRunner(State, InstructionBenchmark::Uops) {}
  22. ~UopsBenchmarkRunner() override;
  23. static constexpr const size_t kMinNumDifferentAddresses = 6;
  24. private:
  25. Expected<std::vector<BenchmarkMeasure>>
  26. runMeasurements(const FunctionExecutor &Executor) const override;
  27. };
  28. } // namespace exegesis
  29. } // namespace llvm
  30. #endif // LLVM_TOOLS_LLVM_EXEGESIS_UOPSBENCHMARKRUNNER_H