// Common code for all benchmark modes.
class BenchmarkRunner {
public:
- explicit BenchmarkRunner(const LLVMState &State, InstructionBenchmark::ModeE Mode);
+ explicit BenchmarkRunner(const LLVMState &State,
+ InstructionBenchmark::ModeE Mode);
virtual ~BenchmarkRunner();
const LLVMState &State;
const RegisterAliasingTrackerCache RATC;
- llvm::Expected<SnippetPrototype> generateSelfAliasingPrototype(
- const Instruction &Instr) const;
+ llvm::Expected<SnippetPrototype>
+ generateSelfAliasingPrototype(const Instruction &Instr) const;
private:
// API to be implemented by subclasses.
virtual llvm::Expected<SnippetPrototype>
- generatePrototype(unsigned Opcode) const = 0;
+ generatePrototype(unsigned Opcode) const = 0;
virtual std::vector<BenchmarkMeasure>
- runMeasurements(const ExecutableFunction &EF,
- const unsigned NumRepetitions) const = 0;
+ runMeasurements(const ExecutableFunction &EF,
+ const unsigned NumRepetitions) const = 0;
// Internal helpers.
InstructionBenchmark runOne(const BenchmarkConfiguration &Configuration,
llvm::Expected<std::vector<BenchmarkConfiguration>>
generateConfigurations(unsigned Opcode) const;
-
llvm::Expected<std::string>
writeObjectFile(const BenchmarkConfiguration::Setup &Setup,
llvm::ArrayRef<llvm::MCInst> Code) const;