LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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, IntrinsicLowering *IL);
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 addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
00047   virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
00048                                           MachineCodeEmitter &MCE);
00049 
00050   static unsigned getModuleMatchQuality(const Module &M);
00051   static unsigned getJITMatchQuality();
00052 };
00053 
00054 } // End llvm namespace
00055 
00056 #endif