blob: 75f5d8b4f91d7b0d1a9f9a0740dc1b2a8bc03c63 [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"
Evan Cheng94214702011-07-01 20:45:01 +000016
Evan Chengebdeeab2011-07-08 01:53:10 +000017#define GET_SUBTARGETINFO_ENUM
Evan Cheng94214702011-07-01 20:45:01 +000018#define GET_SUBTARGETINFO_MC_DESC
19#define GET_SUBTARGETINFO_TARGET_DESC
Evan Chengebdeeab2011-07-08 01:53:10 +000020#define GET_SUBTARGETINFO_CTOR
Evan Cheng385e9302011-07-01 22:36:09 +000021#include "AlphaGenSubtargetInfo.inc"
Evan Cheng94214702011-07-01 20:45:01 +000022
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 Cheng0ddff1b2011-07-07 07:07:08 +000027 : AlphaGenSubtargetInfo(TT, CPU, FS), 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 Cheng0ddff1b2011-07-07 07:07:08 +000033 ParseSubtargetFeatures(CPUName, FS);
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}