blob: 5ed2d312780c94f6f1a43833c34d0195686f1b57 [file] [log] [blame]
Andrew Lenhartha7a83b92005-09-29 22:54:56 +00001//===- AlphaSubtarget.cpp - Alpha Subtarget Information ---------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattnerf3ebc3f2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Andrew Lenhartha7a83b92005-09-29 22:54:56 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file implements the Alpha specific subclass of TargetSubtarget.
11//
12//===----------------------------------------------------------------------===//
13
14#include "AlphaSubtarget.h"
15#include "Alpha.h"
Chris Lattner766361e2005-10-23 22:15:34 +000016#include "AlphaGenSubtarget.inc"
Evan Cheng54b68e32011-07-01 20:45:01 +000017
18#define GET_SUBTARGETINFO_CTOR
19#define GET_SUBTARGETINFO_MC_DESC
20#define GET_SUBTARGETINFO_TARGET_DESC
21#include "AlphaGenSubtarget.inc"
22
Andrew Lenhartha7a83b92005-09-29 22:54:56 +000023using namespace llvm;
24
Evan Chengfe6e4052011-06-30 01:53:36 +000025AlphaSubtarget::AlphaSubtarget(const std::string &TT, const std::string &CPU,
26 const std::string &FS)
Evan Cheng54b68e32011-07-01 20:45:01 +000027 : AlphaGenSubtargetInfo(), HasCT(false) {
Evan Chengfe6e4052011-06-30 01:53:36 +000028 std::string CPUName = CPU;
29 if (CPUName.empty())
30 CPUName = "generic";
Jim Laskeya2b52352005-10-26 17:30:34 +000031
32 // Parse features string.
Evan Chengfe6e4052011-06-30 01:53:36 +000033 ParseSubtargetFeatures(FS, CPUName);
Evan Cheng54b68e32011-07-01 20:45:01 +000034
35 // Initialize scheduling itinerary for the specified CPU.
36 InstrItins = getInstrItineraryForCPU(CPUName);
Andrew Lenhartha7a83b92005-09-29 22:54:56 +000037}