#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() { … }
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 ,
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() { … }
namespace {
bool opcodeIsNotAvailable(unsigned, const FeatureBitset &) { … }
class ExegesisDefaultTarget : public ExegesisTarget { … };
}
const ExegesisTarget &ExegesisTarget::getDefault() { … }
}
}