LLVM API Documentation

IA64TargetMachine.h

Go to the documentation of this file.
00001 //===-- IA64TargetMachine.h - Define TargetMachine for IA64 ---*- 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 IA64 specific subclass of TargetMachine.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_TARGET_IA64TARGETMACHINE_H
00015 #define LLVM_TARGET_IA64TARGETMACHINE_H
00016 
00017 #include "llvm/Target/TargetMachine.h"
00018 #include "llvm/Target/TargetData.h"
00019 #include "llvm/Target/TargetFrameInfo.h"
00020 #include "IA64InstrInfo.h"
00021 #include "IA64ISelLowering.h"
00022 #include "IA64Subtarget.h"
00023 
00024 namespace llvm {
00025 
00026 class IA64TargetMachine : public LLVMTargetMachine {
00027   IA64Subtarget    Subtarget;
00028   const TargetData DataLayout;       // Calculates type size & alignment
00029   IA64InstrInfo      InstrInfo;
00030   TargetFrameInfo    FrameInfo;
00031   //IA64JITInfo      JITInfo;
00032   IA64TargetLowering TLInfo;
00033   
00034 protected:
00035   virtual const TargetAsmInfo *createTargetAsmInfo() const;
00036 
00037 public:
00038   IA64TargetMachine(const Module &M, const std::string &FS);
00039 
00040   virtual const IA64InstrInfo      *getInstrInfo() const { return &InstrInfo; }
00041   virtual const TargetFrameInfo    *getFrameInfo() const { return &FrameInfo; }
00042   virtual const IA64Subtarget  *getSubtargetImpl() const { return &Subtarget; }
00043   virtual       IA64TargetLowering *getTargetLowering() const { 
00044     return const_cast<IA64TargetLowering*>(&TLInfo);
00045   }
00046   virtual const IA64RegisterInfo   *getRegisterInfo() const {
00047     return &InstrInfo.getRegisterInfo();
00048   }
00049   virtual const TargetData       *getTargetData() const { return &DataLayout; }
00050   
00051   static unsigned getModuleMatchQuality(const Module &M);
00052 
00053   // Pass Pipeline Configuration
00054   virtual bool addInstSelector(PassManagerBase &PM, bool Fast);
00055   virtual bool addPreEmitPass(PassManagerBase &PM, bool Fast);
00056   virtual bool addAssemblyEmitter(PassManagerBase &PM, bool Fast, 
00057                                   raw_ostream &Out);
00058 };
00059 } // End llvm namespace
00060 
00061 #endif
00062 
00063