LLVM API Documentation

SparcTargetMachine.h
Go to the documentation of this file.
00001 //===-- SparcTargetMachine.h - Define TargetMachine for Sparc ---*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file declares the Sparc specific subclass of TargetMachine.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_LIB_TARGET_SPARC_SPARCTARGETMACHINE_H
00015 #define LLVM_LIB_TARGET_SPARC_SPARCTARGETMACHINE_H
00016 
00017 #include "SparcInstrInfo.h"
00018 #include "SparcSubtarget.h"
00019 #include "llvm/Target/TargetMachine.h"
00020 
00021 namespace llvm {
00022 
00023 class SparcTargetMachine : public LLVMTargetMachine {
00024   SparcSubtarget Subtarget;
00025 public:
00026   SparcTargetMachine(const Target &T, StringRef TT,
00027                      StringRef CPU, StringRef FS, const TargetOptions &Options,
00028                      Reloc::Model RM, CodeModel::Model CM,
00029                      CodeGenOpt::Level OL, bool is64bit);
00030 
00031   const SparcSubtarget *getSubtargetImpl() const override { return &Subtarget; }
00032 
00033   // Pass Pipeline Configuration
00034   TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
00035 };
00036 
00037 /// SparcV8TargetMachine - Sparc 32-bit target machine
00038 ///
00039 class SparcV8TargetMachine : public SparcTargetMachine {
00040   virtual void anchor();
00041 public:
00042   SparcV8TargetMachine(const Target &T, StringRef TT,
00043                        StringRef CPU, StringRef FS,
00044                        const TargetOptions &Options,
00045                        Reloc::Model RM, CodeModel::Model CM,
00046                        CodeGenOpt::Level OL);
00047 };
00048 
00049 /// SparcV9TargetMachine - Sparc 64-bit target machine
00050 ///
00051 class SparcV9TargetMachine : public SparcTargetMachine {
00052   virtual void anchor();
00053 public:
00054   SparcV9TargetMachine(const Target &T, StringRef TT,
00055                        StringRef CPU, StringRef FS,
00056                        const TargetOptions &Options,
00057                        Reloc::Model RM, CodeModel::Model CM,
00058                        CodeGenOpt::Level OL);
00059 };
00060 
00061 } // end namespace llvm
00062 
00063 #endif