llvm/llvm/tools/llvm-exegesis/lib/Target.cpp

//===-- Target.cpp ----------------------------------------------*- 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
//
//===----------------------------------------------------------------------===//
#include "Target.h"

#include "LatencyBenchmarkRunner.h"
#include "ParallelSnippetGenerator.h"
#include "PerfHelper.h"
#include "SerialSnippetGenerator.h"
#include "UopsBenchmarkRunner.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/Error.h"
#include "llvm/TargetParser/SubtargetFeature.h"

namespace llvm {
namespace exegesis {

cl::OptionCategory Options("llvm-exegesis options");
cl::OptionCategory BenchmarkOptions("llvm-exegesis benchmark options");
cl::OptionCategory AnalysisOptions("llvm-exegesis analysis options");

ExegesisTarget::~ExegesisTarget() {} // anchor.

static ExegesisTarget *FirstTarget =;

const ExegesisTarget *ExegesisTarget::lookup(Triple TT) {}

Expected<std::unique_ptr<pfm::CounterGroup>>
ExegesisTarget::createCounter(StringRef CounterName, const LLVMState &,
                              ArrayRef<const char *> ValidationCounters,
                              const pid_t ProcessID) const {}

void ExegesisTarget::registerTarget(ExegesisTarget *Target) {}

std::unique_ptr<SnippetGenerator> ExegesisTarget::createSnippetGenerator(
    Benchmark::ModeE Mode, const LLVMState &State,
    const SnippetGenerator::Options &Opts) const {}

Expected<std::unique_ptr<BenchmarkRunner>>
ExegesisTarget::createBenchmarkRunner(
    Benchmark::ModeE Mode, const LLVMState &State,
    BenchmarkPhaseSelectorE BenchmarkPhaseSelector,
    BenchmarkRunner::ExecutionModeE ExecutionMode,
    unsigned BenchmarkRepeatCount, ArrayRef<ValidationEvent> ValidationCounters,
    Benchmark::ResultAggregationModeE ResultAggMode) const {}

std::unique_ptr<SnippetGenerator> ExegesisTarget::createSerialSnippetGenerator(
    const LLVMState &State, const SnippetGenerator::Options &Opts) const {}

std::unique_ptr<SnippetGenerator> ExegesisTarget::createParallelSnippetGenerator(
    const LLVMState &State, const SnippetGenerator::Options &Opts) const {}

std::unique_ptr<BenchmarkRunner> ExegesisTarget::createLatencyBenchmarkRunner(
    const LLVMState &State, Benchmark::ModeE Mode,
    BenchmarkPhaseSelectorE BenchmarkPhaseSelector,
    Benchmark::ResultAggregationModeE ResultAggMode,
    BenchmarkRunner::ExecutionModeE ExecutionMode,
    ArrayRef<ValidationEvent> ValidationCounters,
    unsigned BenchmarkRepeatCount) const {}

std::unique_ptr<BenchmarkRunner> ExegesisTarget::createUopsBenchmarkRunner(
    const LLVMState &State, BenchmarkPhaseSelectorE BenchmarkPhaseSelector,
    Benchmark::ResultAggregationModeE /*unused*/,
    BenchmarkRunner::ExecutionModeE ExecutionMode,
    ArrayRef<ValidationEvent> ValidationCounters) const {}

static_assert;

const PfmCountersInfo PfmCountersInfo::Default =;
const PfmCountersInfo PfmCountersInfo::Dummy =;

const PfmCountersInfo &ExegesisTarget::getPfmCounters(StringRef CpuName) const {}

const PfmCountersInfo &ExegesisTarget::getDummyPfmCounters() const {}

ExegesisTarget::SavedState::~SavedState() {} // anchor.

namespace {

bool opcodeIsNotAvailable(unsigned, const FeatureBitset &) {}

// Default implementation.
class ExegesisDefaultTarget : public ExegesisTarget {};

} // namespace

const ExegesisTarget &ExegesisTarget::getDefault() {}

} // namespace exegesis
} // namespace llvm