mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
052f666a48
LBR contains (up to) 16 entries for last x branches and the X86LBRCounter (from D77422) should be able to return all those. Currently, it just returns the latest entry, which could lead to mis-leading measurements. This patch aslo changes the LatencyBenchmarkRunner to accommodate multi-value readings. https://reviews.llvm.org/D81050
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
//===-- LatencyBenchmarkRunner.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 instruction latencies.
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_TOOLS_LLVM_EXEGESIS_LATENCY_H
|
|
#define LLVM_TOOLS_LLVM_EXEGESIS_LATENCY_H
|
|
|
|
#include "BenchmarkRunner.h"
|
|
|
|
namespace llvm {
|
|
namespace exegesis {
|
|
|
|
class LatencyBenchmarkRunner : public BenchmarkRunner {
|
|
public:
|
|
LatencyBenchmarkRunner(
|
|
const LLVMState &State, InstructionBenchmark::ModeE Mode,
|
|
InstructionBenchmark::ResultAggregationModeE ResultAggMode);
|
|
~LatencyBenchmarkRunner() override;
|
|
|
|
private:
|
|
Expected<std::vector<BenchmarkMeasure>>
|
|
runMeasurements(const FunctionExecutor &Executor) const override;
|
|
|
|
InstructionBenchmark::ResultAggregationModeE ResultAggMode;
|
|
};
|
|
} // namespace exegesis
|
|
} // namespace llvm
|
|
|
|
#endif // LLVM_TOOLS_LLVM_EXEGESIS_LATENCY_H
|