summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Alpha
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/Alpha')
-rw-r--r--llvm/lib/Target/Alpha/AlphaSubtarget.cpp11
-rw-r--r--llvm/lib/Target/Alpha/AlphaSubtarget.h5
2 files changed, 14 insertions, 2 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaSubtarget.cpp b/llvm/lib/Target/Alpha/AlphaSubtarget.cpp
index 7080327f1db..5ed2d312780 100644
--- a/llvm/lib/Target/Alpha/AlphaSubtarget.cpp
+++ b/llvm/lib/Target/Alpha/AlphaSubtarget.cpp
@@ -14,15 +14,24 @@
#include "AlphaSubtarget.h"
#include "Alpha.h"
#include "AlphaGenSubtarget.inc"
+
+#define GET_SUBTARGETINFO_CTOR
+#define GET_SUBTARGETINFO_MC_DESC
+#define GET_SUBTARGETINFO_TARGET_DESC
+#include "AlphaGenSubtarget.inc"
+
using namespace llvm;
AlphaSubtarget::AlphaSubtarget(const std::string &TT, const std::string &CPU,
const std::string &FS)
- : HasCT(false) {
+ : AlphaGenSubtargetInfo(), HasCT(false) {
std::string CPUName = CPU;
if (CPUName.empty())
CPUName = "generic";
// Parse features string.
ParseSubtargetFeatures(FS, CPUName);
+
+ // Initialize scheduling itinerary for the specified CPU.
+ InstrItins = getInstrItineraryForCPU(CPUName);
}
diff --git a/llvm/lib/Target/Alpha/AlphaSubtarget.h b/llvm/lib/Target/Alpha/AlphaSubtarget.h
index b1ccf26b180..0bd161c9e95 100644
--- a/llvm/lib/Target/Alpha/AlphaSubtarget.h
+++ b/llvm/lib/Target/Alpha/AlphaSubtarget.h
@@ -18,9 +18,12 @@
#include "llvm/MC/MCInstrItineraries.h"
#include <string>
+#define GET_SUBTARGETINFO_HEADER
+#include "AlphaGenSubtarget.inc"
+
namespace llvm {
-class AlphaSubtarget : public TargetSubtarget {
+class AlphaSubtarget : public AlphaGenSubtargetInfo {
protected:
bool HasCT;
OpenPOWER on IntegriCloud