mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
5da66b880e
The addition of `inverse_throughput` mode highlighted the disjointedness of snippet generators and benchmark runners because it used the `UopsSnippetGenerator` with the `LatencyBenchmarkRunner`. To keep the code consistent tie the snippet generators to parallelization/serialization rather than their benchmark runners. Renaming `LatencySnippetGenerator` -> `SerialSnippetGenerator`. Renaming `UopsSnippetGenerator` -> `ParallelSnippetGenerator`. Differential Revision: https://reviews.llvm.org/D72928
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
//===-- UopsBenchmarkRunner.h -----------------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
/// \file
|
|
/// A BenchmarkRunner implementation to measure uop decomposition.
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_TOOLS_LLVM_EXEGESIS_UOPSBENCHMARKRUNNER_H
|
|
#define LLVM_TOOLS_LLVM_EXEGESIS_UOPSBENCHMARKRUNNER_H
|
|
|
|
#include "BenchmarkRunner.h"
|
|
|
|
namespace llvm {
|
|
namespace exegesis {
|
|
|
|
class UopsBenchmarkRunner : public BenchmarkRunner {
|
|
public:
|
|
UopsBenchmarkRunner(const LLVMState &State)
|
|
: BenchmarkRunner(State, InstructionBenchmark::Uops) {}
|
|
~UopsBenchmarkRunner() override;
|
|
|
|
static constexpr const size_t kMinNumDifferentAddresses = 6;
|
|
|
|
private:
|
|
Expected<std::vector<BenchmarkMeasure>>
|
|
runMeasurements(const FunctionExecutor &Executor) const override;
|
|
};
|
|
|
|
} // namespace exegesis
|
|
} // namespace llvm
|
|
|
|
#endif // LLVM_TOOLS_LLVM_EXEGESIS_UOPSBENCHMARKRUNNER_H
|