blob: fce65fc570bca8b6cdf358588229316a9479fb67 [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//
Evan Cheng0d639a22011-07-01 21:01:15 +000010// This file implements the Alpha specific subclass of TargetSubtargetInfo.
Andrew Lenhartha7a83b92005-09-29 22:54:56 +000011//
12//===----------------------------------------------------------------------===//
13
14#include "AlphaSubtarget.h"
15#include "Alpha.h"
Evan Cheng54b68e32011-07-01 20:45:01 +000016
17#define GET_SUBTARGETINFO_CTOR
18#define GET_SUBTARGETINFO_MC_DESC
19#define GET_SUBTARGETINFO_TARGET_DESC
Evan Chengc9c090d2011-07-01 22:36:09 +000020#include "AlphaGenSubtargetInfo.inc"
Evan Cheng54b68e32011-07-01 20:45:01 +000021
Andrew Lenhartha7a83b92005-09-29 22:54:56 +000022using namespace llvm;
23
Evan Chengfe6e4052011-06-30 01:53:36 +000024AlphaSubtarget::AlphaSubtarget(const std::string &TT, const std::string &CPU,
25 const std::string &FS)
Evan Cheng54b68e32011-07-01 20:45:01 +000026 : AlphaGenSubtargetInfo(), HasCT(false) {
Evan Chengfe6e4052011-06-30 01:53:36 +000027 std::string CPUName = CPU;
28 if (CPUName.empty())
29 CPUName = "generic";
Jim Laskeya2b52352005-10-26 17:30:34 +000030
31 // Parse features string.
Evan Chengfe6e4052011-06-30 01:53:36 +000032 ParseSubtargetFeatures(FS, CPUName);
Evan Cheng54b68e32011-07-01 20:45:01 +000033
34 // Initialize scheduling itinerary for the specified CPU.
35 InstrItins = getInstrItineraryForCPU(CPUName);
Andrew Lenhartha7a83b92005-09-29 22:54:56 +000036}