LLVM API Documentation

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

SkeletonTargetMachine.h

Go to the documentation of this file.
00001 //===-- SkeletonTargetMachine.h - TargetMachine for Skeleton ----*- 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 Skeleton specific subclass of TargetMachine.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef SKELETONTARGETMACHINE_H
00015 #define SKELETONTARGETMACHINE_H
00016 
00017 #include "llvm/Target/TargetMachine.h"
00018 #include "llvm/Target/TargetFrameInfo.h"
00019 #include "llvm/PassManager.h"
00020 #include "SkeletonInstrInfo.h"
00021 #include "SkeletonJITInfo.h"
00022 
00023 namespace llvm {
00024   class IntrinsicLowering;
00025 
00026   class SkeletonTargetMachine : public TargetMachine {
00027     SkeletonInstrInfo InstrInfo;
00028     TargetFrameInfo FrameInfo;
00029     SkeletonJITInfo JITInfo;
00030   public:
00031     SkeletonTargetMachine(const Module &M, IntrinsicLowering *IL);
00032 
00033     virtual const SkeletonInstrInfo *getInstrInfo() const { return &InstrInfo; }
00034     virtual const TargetFrameInfo  *getFrameInfo() const { return &FrameInfo; }
00035     virtual const MRegisterInfo *getRegisterInfo() const {
00036       return &InstrInfo.getRegisterInfo();
00037     }
00038     virtual TargetJITInfo *getJITInfo() {
00039       return &JITInfo;
00040     }
00041 
00042     virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
00043                                             MachineCodeEmitter &MCE);
00044   
00045     virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
00046   };
00047 
00048 } // end namespace llvm
00049 
00050 #endif