blob: 70b311683f8bbedc9337a77e4d6ad620a921f178 [file] [log] [blame]
Andrew Lenharth120ab482005-09-29 22:54:56 +00001//=====-- AlphaSubtarget.h - Define Subtarget for the Alpha --*- 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 declares the Alpha specific subclass of TargetSubtargetInfo.
Andrew Lenharth120ab482005-09-29 22:54:56 +000011//
12//===----------------------------------------------------------------------===//
13
14#ifndef ALPHASUBTARGET_H
15#define ALPHASUBTARGET_H
16
Evan Cheng5b1b44892011-07-01 21:01:15 +000017#include "llvm/Target/TargetSubtargetInfo.h"
Evan Chengab8be962011-06-29 01:14:12 +000018#include "llvm/MC/MCInstrItineraries.h"
Andrew Lenharth120ab482005-09-29 22:54:56 +000019#include <string>
20
Evan Cheng94214702011-07-01 20:45:01 +000021#define GET_SUBTARGETINFO_HEADER
Evan Cheng385e9302011-07-01 22:36:09 +000022#include "AlphaGenSubtargetInfo.inc"
Evan Cheng94214702011-07-01 20:45:01 +000023
Andrew Lenharth120ab482005-09-29 22:54:56 +000024namespace llvm {
Evan Cheng0ddff1b2011-07-07 07:07:08 +000025class StringRe;
Andrew Lenharth120ab482005-09-29 22:54:56 +000026
Evan Cheng94214702011-07-01 20:45:01 +000027class AlphaSubtarget : public AlphaGenSubtargetInfo {
Andrew Lenharth120ab482005-09-29 22:54:56 +000028protected:
29
Andrew Lenharth120ab482005-09-29 22:54:56 +000030 bool HasCT;
31
Andrew Lenharth017c5562006-03-09 17:16:45 +000032 InstrItineraryData InstrItins;
33
Andrew Lenharth120ab482005-09-29 22:54:56 +000034public:
35 /// This constructor initializes the data members to match that
Daniel Dunbar3be03402009-08-02 22:11:08 +000036 /// of the specified triple.
Andrew Lenharth120ab482005-09-29 22:54:56 +000037 ///
Evan Cheng276365d2011-06-30 01:53:36 +000038 AlphaSubtarget(const std::string &TT, const std::string &CPU,
39 const std::string &FS);
Jim Laskey581a8f72005-10-26 17:30:34 +000040
41 /// ParseSubtargetFeatures - Parses features string setting specified
Jim Laskey2cbc2072005-10-26 18:07:50 +000042 /// subtarget options. Definition of function is auto generated by tblgen.
Evan Cheng0ddff1b2011-07-07 07:07:08 +000043 void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
Andrew Lenharth120ab482005-09-29 22:54:56 +000044
Andrew Lenharth120ab482005-09-29 22:54:56 +000045 bool hasCT() const { return HasCT; }
46};
47} // End llvm namespace
48
49#endif