LLVM API Documentation
00001 //===-- ARMTargetMachine.h - Define TargetMachine for ARM -------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file was developed by the "Instituto Nokia de Tecnologia" and 00006 // is distributed under the University of Illinois Open Source 00007 // License. See LICENSE.TXT for details. 00008 // 00009 //===----------------------------------------------------------------------===// 00010 // 00011 // This file declares the ARM specific subclass of TargetMachine. 00012 // 00013 //===----------------------------------------------------------------------===// 00014 00015 #ifndef ARMTARGETMACHINE_H 00016 #define ARMTARGETMACHINE_H 00017 00018 #include "llvm/Target/TargetMachine.h" 00019 #include "llvm/Target/TargetData.h" 00020 #include "llvm/Target/TargetFrameInfo.h" 00021 #include "llvm/PassManager.h" 00022 #include "ARMInstrInfo.h" 00023 00024 namespace llvm { 00025 00026 class Module; 00027 00028 class ARMTargetMachine : public TargetMachine { 00029 const TargetData DataLayout; // Calculates type size & alignment 00030 ARMInstrInfo InstrInfo; 00031 TargetFrameInfo FrameInfo; 00032 public: 00033 ARMTargetMachine(const Module &M, const std::string &FS); 00034 00035 virtual const ARMInstrInfo *getInstrInfo() const { return &InstrInfo; } 00036 virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; } 00037 virtual const MRegisterInfo *getRegisterInfo() const { 00038 return &InstrInfo.getRegisterInfo(); 00039 } 00040 virtual const TargetData *getTargetData() const { return &DataLayout; } 00041 static unsigned getModuleMatchQuality(const Module &M); 00042 00043 virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out, 00044 CodeGenFileType FileType, bool Fast); 00045 }; 00046 00047 } // end namespace llvm 00048 00049 #endif