LLVM API Documentation

SparcSubtarget.h

Go to the documentation of this file.
00001 //=====-- SparcSubtarget.h - Define Subtarget for the SPARC ----*- C++ -*-====//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file was developed by Chris Lattner 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 SPARC specific subclass of TargetSubtarget.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef SPARC_SUBTARGET_H
00015 #define SPARC_SUBTARGET_H
00016 
00017 #include "llvm/Target/TargetSubtarget.h"
00018 #include <string>
00019 
00020 namespace llvm {
00021   class Module;
00022   
00023 class SparcSubtarget : public TargetSubtarget {
00024   bool IsV9;
00025   bool V8DeprecatedInsts;
00026   bool IsVIS;
00027 public:
00028   SparcSubtarget(const Module &M, const std::string &FS);
00029 
00030   bool isV9() const { return IsV9; }
00031   bool isVIS() const { return IsVIS; }
00032   bool useDeprecatedV8Instructions() const { return V8DeprecatedInsts; }
00033   
00034   /// ParseSubtargetFeatures - Parses features string setting specified 
00035   /// subtarget options.  Definition of function is auto generated by tblgen.
00036   void ParseSubtargetFeatures(const std::string &FS, const std::string &CPU);
00037   
00038 };
00039 
00040 } // end namespace llvm
00041 
00042 #endif