Rename TargetSubtarget to TargetSubtargetInfo for consistency.
[oota-llvm.git] / lib / Target / Alpha / AlphaSubtarget.cpp
1 //===- AlphaSubtarget.cpp - Alpha Subtarget Information ---------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the Alpha specific subclass of TargetSubtargetInfo.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "AlphaSubtarget.h"
15 #include "Alpha.h"
16 #include "AlphaGenSubtarget.inc"
17
18 #define GET_SUBTARGETINFO_CTOR
19 #define GET_SUBTARGETINFO_MC_DESC
20 #define GET_SUBTARGETINFO_TARGET_DESC
21 #include "AlphaGenSubtarget.inc"
22
23 using namespace llvm;
24
25 AlphaSubtarget::AlphaSubtarget(const std::string &TT, const std::string &CPU,
26                                const std::string &FS)
27   : AlphaGenSubtargetInfo(), HasCT(false) {
28   std::string CPUName = CPU;
29   if (CPUName.empty())
30     CPUName = "generic";
31
32   // Parse features string.
33   ParseSubtargetFeatures(FS, CPUName);
34
35   // Initialize scheduling itinerary for the specified CPU.
36   InstrItins = getInstrItineraryForCPU(CPUName);
37 }