blob: fce65fc570bca8b6cdf358588229316a9479fb67 [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
17#define GET_SUBTARGETINFO_CTOR
18#define GET_SUBTARGETINFO_MC_DESC
19#define GET_SUBTARGETINFO_TARGET_DESC
Evan Cheng385e9302011-07-01 22:36:09 +000020#include "AlphaGenSubtargetInfo.inc"
Evan Cheng94214702011-07-01 20:45:01 +000021
Andrew Lenharth120ab482005-09-29 22:54:56 +000022using namespace llvm;
23
Evan Cheng276365d2011-06-30 01:53:36 +000024AlphaSubtarget::AlphaSubtarget(const std::string &TT, const std::string &CPU,
25 const std::string &FS)
Evan Cheng94214702011-07-01 20:45:01 +000026 : AlphaGenSubtargetInfo(), HasCT(false) {
Evan Cheng276365d2011-06-30 01:53:36 +000027 std::string CPUName = CPU;
28 if (CPUName.empty())
29 CPUName = "generic";
Jim Laskey581a8f72005-10-26 17:30:34 +000030
31 // Parse features string.
Evan Cheng276365d2011-06-30 01:53:36 +000032 ParseSubtargetFeatures(FS, CPUName);
Evan Cheng94214702011-07-01 20:45:01 +000033
34 // Initialize scheduling itinerary for the specified CPU.
35 InstrItins = getInstrItineraryForCPU(CPUName);
Andrew Lenharth120ab482005-09-29 22:54:56 +000036}