LLVM API Documentation
00001 //=====-- AlphaSubtarget.h - Define Subtarget for the Alpha --*- C++ -*--====// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file was developed by Andrew Lenharth and is distributed under the 00006 // University of Illinois Open Source License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file declares the Alpha specific subclass of TargetSubtarget. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef ALPHASUBTARGET_H 00015 #define ALPHASUBTARGET_H 00016 00017 #include "llvm/Target/TargetInstrItineraries.h" 00018 #include "llvm/Target/TargetSubtarget.h" 00019 00020 #include <string> 00021 00022 namespace llvm { 00023 class Module; 00024 00025 class AlphaSubtarget : public TargetSubtarget { 00026 protected: 00027 00028 /// Used by the ISel to turn in optimizations for POWER4-derived architectures 00029 bool HasF2I; 00030 bool HasCT; 00031 00032 InstrItineraryData InstrItins; 00033 00034 public: 00035 /// This constructor initializes the data members to match that 00036 /// of the specified module. 00037 /// 00038 AlphaSubtarget(const Module &M, const std::string &FS); 00039 00040 /// ParseSubtargetFeatures - Parses features string setting specified 00041 /// subtarget options. Definition of function is auto generated by tblgen. 00042 void ParseSubtargetFeatures(const std::string &FS, const std::string &CPU); 00043 00044 bool hasF2I() const { return HasF2I; } 00045 bool hasCT() const { return HasCT; } 00046 }; 00047 } // End llvm namespace 00048 00049 #endif