summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Alpha/AlphaSubtarget.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-01 20:45:01 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-01 20:45:01 +0000
commit54b68e34322314528624fd56ec32df8968c41a94 (patch)
tree1928d04d97da90de983d3a51b9e617f98a2d2e60 /llvm/lib/Target/Alpha/AlphaSubtarget.cpp
parentb929de3c3d5c11d6136be1f59838788b8797ac12 (diff)
downloadbcm5719-llvm-54b68e34322314528624fd56ec32df8968c41a94.tar.gz
bcm5719-llvm-54b68e34322314528624fd56ec32df8968c41a94.zip
- Added MCSubtargetInfo to capture subtarget features and scheduling
itineraries. - Refactor TargetSubtarget to be based on MCSubtargetInfo. - Change tablegen generated subtarget info to initialize MCSubtargetInfo and hide more details from targets. llvm-svn: 134257
Diffstat (limited to 'llvm/lib/Target/Alpha/AlphaSubtarget.cpp')
-rw-r--r--llvm/lib/Target/Alpha/AlphaSubtarget.cpp11
1 files changed, 10 insertions, 1 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);
}
OpenPOWER on IntegriCloud