summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/MBlaze/MBlazeSubtarget.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/MBlaze/MBlazeSubtarget.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/MBlaze/MBlazeSubtarget.cpp')
-rw-r--r--llvm/lib/Target/MBlaze/MBlazeSubtarget.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/Target/MBlaze/MBlazeSubtarget.cpp b/llvm/lib/Target/MBlaze/MBlazeSubtarget.cpp
index 034b5ce49c1..0ba0bea4659 100644
--- a/llvm/lib/Target/MBlaze/MBlazeSubtarget.cpp
+++ b/llvm/lib/Target/MBlaze/MBlazeSubtarget.cpp
@@ -14,13 +14,19 @@
#include "MBlazeSubtarget.h"
#include "MBlaze.h"
#include "MBlazeRegisterInfo.h"
-#include "MBlazeGenSubtarget.inc"
#include "llvm/Support/CommandLine.h"
+
+#define GET_SUBTARGETINFO_CTOR
+#define GET_SUBTARGETINFO_MC_DESC
+#define GET_SUBTARGETINFO_TARGET_DESC
+#include "MBlazeGenSubtarget.inc"
+
using namespace llvm;
MBlazeSubtarget::MBlazeSubtarget(const std::string &TT,
const std::string &CPU,
const std::string &FS):
+ MBlazeGenSubtargetInfo(),
HasBarrel(false), HasDiv(false), HasMul(false), HasPatCmp(false),
HasFPU(false), HasMul64(false), HasSqrt(false)
{
@@ -35,6 +41,9 @@ MBlazeSubtarget::MBlazeSubtarget(const std::string &TT,
HasItin = CPUName != "mblaze";
DEBUG(dbgs() << "CPU " << CPUName << "(" << HasItin << ")\n");
+ // Initialize scheduling itinerary for the specified CPU.
+ InstrItins = getInstrItineraryForCPU(CPUName);
+
// Compute the issue width of the MBlaze itineraries
computeIssueWidth();
}
OpenPOWER on IntegriCloud