Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 1 | //=====-- AlphaSubtarget.h - Define Subtarget for the Alpha --*- C++ -*--====// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 4ee451d | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file declares the Alpha specific subclass of TargetSubtarget. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef ALPHASUBTARGET_H |
| 15 | #define ALPHASUBTARGET_H |
| 16 | |
| 17 | #include "llvm/Target/TargetSubtarget.h" |
Evan Cheng | ab8be96 | 2011-06-29 01:14:12 +0000 | [diff] [blame] | 18 | #include "llvm/MC/MCInstrItineraries.h" |
Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 19 | #include <string> |
| 20 | |
| 21 | namespace llvm { |
Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 22 | |
| 23 | class AlphaSubtarget : public TargetSubtarget { |
| 24 | protected: |
| 25 | |
Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 26 | bool HasCT; |
| 27 | |
Andrew Lenharth | 017c556 | 2006-03-09 17:16:45 +0000 | [diff] [blame] | 28 | InstrItineraryData InstrItins; |
| 29 | |
Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 30 | public: |
| 31 | /// This constructor initializes the data members to match that |
Daniel Dunbar | 3be0340 | 2009-08-02 22:11:08 +0000 | [diff] [blame] | 32 | /// of the specified triple. |
Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 33 | /// |
Evan Cheng | 276365d | 2011-06-30 01:53:36 +0000 | [diff] [blame] | 34 | AlphaSubtarget(const std::string &TT, const std::string &CPU, |
| 35 | const std::string &FS); |
Jim Laskey | 581a8f7 | 2005-10-26 17:30:34 +0000 | [diff] [blame] | 36 | |
| 37 | /// ParseSubtargetFeatures - Parses features string setting specified |
Jim Laskey | 2cbc207 | 2005-10-26 18:07:50 +0000 | [diff] [blame] | 38 | /// subtarget options. Definition of function is auto generated by tblgen. |
Evan Cheng | 276365d | 2011-06-30 01:53:36 +0000 | [diff] [blame] | 39 | void ParseSubtargetFeatures(const std::string &FS, const std::string &CPU); |
Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 40 | |
Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 41 | bool hasCT() const { return HasCT; } |
| 42 | }; |
| 43 | } // End llvm namespace |
| 44 | |
| 45 | #endif |