|
@@ -9,6 +9,7 @@
|
|
|
#include "Target.h"
|
|
|
|
|
|
#include "Latency.h"
|
|
|
+#include "ROBSize.h"
|
|
|
#include "Uops.h"
|
|
|
|
|
|
namespace llvm {
|
|
@@ -37,6 +38,31 @@ void ExegesisTarget::registerTarget(ExegesisTarget *Target) {
|
|
|
FirstTarget = Target;
|
|
|
}
|
|
|
|
|
|
+std::unique_ptr<SnippetGenerator>
|
|
|
+ExegesisTarget::createLatencySnippetGenerator(const LLVMState &State) const {
|
|
|
+ return llvm::make_unique<LatencySnippetGenerator>(State);
|
|
|
+}
|
|
|
+
|
|
|
+std::unique_ptr<SnippetGenerator>
|
|
|
+ExegesisTarget::createUopsSnippetGenerator(const LLVMState &State) const {
|
|
|
+ return llvm::make_unique<UopsSnippetGenerator>(State);
|
|
|
+}
|
|
|
+
|
|
|
+std::unique_ptr<SnippetGenerator>
|
|
|
+static createROBSizeSnippetGenerator(const LLVMState &State) {
|
|
|
+ return llvm::make_unique<ROBSizeSnippetGenerator>(State);
|
|
|
+}
|
|
|
+
|
|
|
+std::unique_ptr<BenchmarkRunner>
|
|
|
+ExegesisTarget::createLatencyBenchmarkRunner(const LLVMState &State) const {
|
|
|
+ return llvm::make_unique<LatencyBenchmarkRunner>(State);
|
|
|
+}
|
|
|
+
|
|
|
+std::unique_ptr<BenchmarkRunner>
|
|
|
+ExegesisTarget::createUopsBenchmarkRunner(const LLVMState &State) const {
|
|
|
+ return llvm::make_unique<UopsBenchmarkRunner>(State);
|
|
|
+}
|
|
|
+
|
|
|
std::unique_ptr<SnippetGenerator>
|
|
|
ExegesisTarget::createSnippetGenerator(InstructionBenchmark::ModeE Mode,
|
|
|
const LLVMState &State) const {
|
|
@@ -47,6 +73,8 @@ ExegesisTarget::createSnippetGenerator(InstructionBenchmark::ModeE Mode,
|
|
|
return createLatencySnippetGenerator(State);
|
|
|
case InstructionBenchmark::Uops:
|
|
|
return createUopsSnippetGenerator(State);
|
|
|
+ case InstructionBenchmark::ROBSize:
|
|
|
+ return createROBSizeSnippetGenerator(State);
|
|
|
}
|
|
|
return nullptr;
|
|
|
}
|
|
@@ -58,6 +86,7 @@ ExegesisTarget::createBenchmarkRunner(InstructionBenchmark::ModeE Mode,
|
|
|
case InstructionBenchmark::Unknown:
|
|
|
return nullptr;
|
|
|
case InstructionBenchmark::Latency:
|
|
|
+ case InstructionBenchmark::ROBSize:
|
|
|
return createLatencyBenchmarkRunner(State);
|
|
|
case InstructionBenchmark::Uops:
|
|
|
return createUopsBenchmarkRunner(State);
|
|
@@ -65,26 +94,6 @@ ExegesisTarget::createBenchmarkRunner(InstructionBenchmark::ModeE Mode,
|
|
|
return nullptr;
|
|
|
}
|
|
|
|
|
|
-std::unique_ptr<SnippetGenerator>
|
|
|
-ExegesisTarget::createLatencySnippetGenerator(const LLVMState &State) const {
|
|
|
- return llvm::make_unique<LatencySnippetGenerator>(State);
|
|
|
-}
|
|
|
-
|
|
|
-std::unique_ptr<SnippetGenerator>
|
|
|
-ExegesisTarget::createUopsSnippetGenerator(const LLVMState &State) const {
|
|
|
- return llvm::make_unique<UopsSnippetGenerator>(State);
|
|
|
-}
|
|
|
-
|
|
|
-std::unique_ptr<BenchmarkRunner>
|
|
|
-ExegesisTarget::createLatencyBenchmarkRunner(const LLVMState &State) const {
|
|
|
- return llvm::make_unique<LatencyBenchmarkRunner>(State);
|
|
|
-}
|
|
|
-
|
|
|
-std::unique_ptr<BenchmarkRunner>
|
|
|
-ExegesisTarget::createUopsBenchmarkRunner(const LLVMState &State) const {
|
|
|
- return llvm::make_unique<UopsBenchmarkRunner>(State);
|
|
|
-}
|
|
|
-
|
|
|
static_assert(std::is_pod<PfmCountersInfo>::value,
|
|
|
"We shouldn't have dynamic initialization here");
|
|
|
const PfmCountersInfo PfmCountersInfo::Default = {nullptr, nullptr, nullptr, 0u};
|
|
@@ -123,6 +132,11 @@ private:
|
|
|
llvm_unreachable("Not yet implemented");
|
|
|
}
|
|
|
|
|
|
+ std::vector<llvm::MCInst> copyReg(const llvm::MCSubtargetInfo &STI,
|
|
|
+ unsigned ToReg, unsigned FromReg) const override {
|
|
|
+ llvm_unreachable("Not yet implemented");
|
|
|
+ }
|
|
|
+
|
|
|
bool matchesArch(llvm::Triple::ArchType Arch) const override {
|
|
|
llvm_unreachable("never called");
|
|
|
return false;
|