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 | // |
| 5 | // This file was developed by Andrew Lenharth and is distributed under the |
| 6 | // University of Illinois Open Source License. See LICENSE.TXT for details. |
| 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" |
| 18 | |
| 19 | #include <string> |
| 20 | |
| 21 | namespace llvm { |
| 22 | class Module; |
| 23 | |
| 24 | class AlphaSubtarget : public TargetSubtarget { |
| 25 | protected: |
| 26 | |
| 27 | /// Used by the ISel to turn in optimizations for POWER4-derived architectures |
| 28 | bool HasF2I; |
| 29 | bool HasCT; |
| 30 | |
| 31 | public: |
| 32 | /// This constructor initializes the data members to match that |
| 33 | /// of the specified module. |
| 34 | /// |
| 35 | AlphaSubtarget(const Module &M, const std::string &FS); |
Jim Laskey | 581a8f7 | 2005-10-26 17:30:34 +0000 | [diff] [blame^] | 36 | |
| 37 | /// ParseSubtargetFeatures - Parses features string setting specified |
| 38 | /// subtarget options. Definition of function is usto generated by tblgen. |
| 39 | void ParseSubtargetFeatures(const std::string &FS, const std::string &CPU); |
Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 40 | |
| 41 | bool hasF2I() const { return HasF2I; } |
| 42 | bool hasCT() const { return HasCT; } |
| 43 | }; |
| 44 | } // End llvm namespace |
| 45 | |
| 46 | #endif |