LLVM API Documentation

SparcV9TargetMachine.h

Go to the documentation of this file.
00001 //===-- SparcV9TargetMachine.h - Define TargetMachine for SparcV9 -*- C++ -*-=//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file was developed by the LLVM research group and is distributed under
00006 // the University of Illinois Open Source License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file declares the top-level SparcV9 target machine.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef SPARCV9TARGETMACHINE_H
00015 #define SPARCV9TARGETMACHINE_H
00016 
00017 #include "llvm/Target/TargetFrameInfo.h"
00018 #include "llvm/Target/TargetMachine.h"
00019 #include "SparcV9InstrInfo.h"
00020 #include "SparcV9Internals.h"
00021 #include "SparcV9RegInfo.h"
00022 #include "SparcV9FrameInfo.h"
00023 #include "SparcV9JITInfo.h"
00024 
00025 namespace llvm {
00026   class PassManager;
00027 
00028 class SparcV9TargetMachine : public TargetMachine {
00029   SparcV9InstrInfo instrInfo;
00030   SparcV9SchedInfo schedInfo;
00031   SparcV9RegInfo   regInfo;
00032   SparcV9FrameInfo frameInfo;
00033   SparcV9JITInfo   jitInfo;
00034 public:
00035   SparcV9TargetMachine(const Module &M, const std::string &FS);
00036 
00037   virtual const TargetInstrInfo  *getInstrInfo() const { return &instrInfo; }
00038   virtual const TargetSchedInfo  *getSchedInfo() const { return &schedInfo; }
00039   virtual const SparcV9RegInfo   *getRegInfo()   const { return &regInfo; }
00040   virtual const TargetFrameInfo  *getFrameInfo() const { return &frameInfo; }
00041   virtual       TargetJITInfo    *getJITInfo()         { return &jitInfo; }
00042   virtual const MRegisterInfo    *getRegisterInfo() const {
00043     return &instrInfo.getRegisterInfo();
00044   }
00045 
00046   virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
00047                                    CodeGenFileType FileType, bool Fast);
00048   virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
00049                                           MachineCodeEmitter &MCE);
00050 
00051   static unsigned getModuleMatchQuality(const Module &M);
00052   static unsigned getJITMatchQuality();
00053 };
00054 
00055 } // End llvm namespace
00056 
00057 #endif