BenchmarkCode.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //===-- BenchmarkCode.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. #ifndef LLVM_TOOLS_LLVM_EXEGESIS_BENCHMARKCODE_H
  9. #define LLVM_TOOLS_LLVM_EXEGESIS_BENCHMARKCODE_H
  10. #include "BenchmarkResult.h"
  11. #include "llvm/MC/MCInst.h"
  12. #include <string>
  13. #include <vector>
  14. namespace llvm {
  15. namespace exegesis {
  16. // A collection of instructions that are to be assembled, executed and measured.
  17. struct BenchmarkCode {
  18. InstructionBenchmarkKey Key;
  19. // We also need to provide the registers that are live on entry for the
  20. // assembler to generate proper prologue/epilogue.
  21. std::vector<unsigned> LiveIns;
  22. // Informations about how this configuration was built.
  23. std::string Info;
  24. };
  25. } // namespace exegesis
  26. } // namespace llvm
  27. #endif // LLVM_TOOLS_LLVM_EXEGESIS_BENCHMARKCODE_H