blob: 847d4956e11851532666681f60a66518b2f659e1 [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 {
Andrew Lenharth120ab482005-09-29 22:54:56 +000025
Evan Cheng94214702011-07-01 20:45:01 +000026class AlphaSubtarget : public AlphaGenSubtargetInfo {
Andrew Lenharth120ab482005-09-29 22:54:56 +000027protected:
28
Andrew Lenharth120ab482005-09-29 22:54:56 +000029 bool HasCT;
30
Andrew Lenharth017c5562006-03-09 17:16:45 +000031 InstrItineraryData InstrItins;
32
Andrew Lenharth120ab482005-09-29 22:54:56 +000033public:
34 /// This constructor initializes the data members to match that
Daniel Dunbar3be03402009-08-02 22:11:08 +000035 /// of the specified triple.
Andrew Lenharth120ab482005-09-29 22:54:56 +000036 ///
Evan Cheng276365d2011-06-30 01:53:36 +000037 AlphaSubtarget(const std::string &TT, const std::string &CPU,
38 const std::string &FS);
Jim Laskey581a8f72005-10-26 17:30:34 +000039
40 /// ParseSubtargetFeatures - Parses features string setting specified
Jim Laskey2cbc2072005-10-26 18:07:50 +000041 /// subtarget options. Definition of function is auto generated by tblgen.
Evan Cheng276365d2011-06-30 01:53:36 +000042 void ParseSubtargetFeatures(const std::string &FS, const std::string &CPU);
Andrew Lenharth120ab482005-09-29 22:54:56 +000043
Andrew Lenharth120ab482005-09-29 22:54:56 +000044 bool hasCT() const { return HasCT; }
45};
46} // End llvm namespace
47
48#endif