1 //===-- BenchmarkCode.h -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_TOOLS_LLVM_EXEGESIS_BENCHMARKCODE_H
11 #define LLVM_TOOLS_LLVM_EXEGESIS_BENCHMARKCODE_H
13 #include "RegisterValue.h"
14 #include "llvm/MC/MCInst.h"
21 // A collection of instructions that are to be assembled, executed and measured.
22 struct BenchmarkCode
{
23 // The sequence of instructions that are to be repeated.
24 std::vector
<llvm::MCInst
> Instructions
;
26 // Before the code is executed some instructions are added to setup the
27 // registers initial values.
28 std::vector
<RegisterValue
> RegisterInitialValues
;
30 // We also need to provide the registers that are live on entry for the
31 // assembler to generate proper prologue/epilogue.
32 std::vector
<unsigned> LiveIns
;
34 // Informations about how this configuration was built.
38 } // namespace exegesis
41 #endif // LLVM_TOOLS_LLVM_EXEGESIS_BENCHMARKCODE_H