blob: c1effe6fa9736dd59262baa38000ab1585a8888b [file] [log] [blame]
Andrew Lenharth120ab482005-09-29 22:54:56 +00001//===- AlphaSubtarget.cpp - Alpha Subtarget Information ---------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-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 Lenharth120ab482005-09-29 22:54:56 +00007//
8//===----------------------------------------------------------------------===//
9//
Evan Cheng5b1b44892011-07-01 21:01:15 +000010// This file implements the Alpha specific subclass of TargetSubtargetInfo.
Andrew Lenharth120ab482005-09-29 22:54:56 +000011//
12//===----------------------------------------------------------------------===//
13
14#include "AlphaSubtarget.h"
15#include "Alpha.h"
Chris Lattnered465f52005-10-23 22:15:34 +000016#include "AlphaGenSubtarget.inc"
Evan Cheng94214702011-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 Lenharth120ab482005-09-29 22:54:56 +000023using namespace llvm;
24
Evan Cheng276365d2011-06-30 01:53:36 +000025AlphaSubtarget::AlphaSubtarget(const std::string &TT, const std::string &CPU,
26 const std::string &FS)
Evan Cheng94214702011-07-01 20:45:01 +000027 : AlphaGenSubtargetInfo(), HasCT(false) {
Evan Cheng276365d2011-06-30 01:53:36 +000028 std::string CPUName = CPU;
29 if (CPUName.empty())
30 CPUName = "generic";
Jim Laskey581a8f72005-10-26 17:30:34 +000031
32 // Parse features string.
Evan Cheng276365d2011-06-30 01:53:36 +000033 ParseSubtargetFeatures(FS, CPUName);
Evan Cheng94214702011-07-01 20:45:01 +000034
35 // Initialize scheduling itinerary for the specified CPU.
36 InstrItins = getInstrItineraryForCPU(CPUName);
Andrew Lenharth120ab482005-09-29 22:54:56 +000037}