1 //===-- ARMTargetMachine.h - Define TargetMachine for ARM -------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by the "Instituto Nokia de Tecnologia" and
6 // is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 // This file declares the ARM specific subclass of TargetMachine.
13 //===----------------------------------------------------------------------===//
15 #ifndef ARMTARGETMACHINE_H
16 #define ARMTARGETMACHINE_H
18 #include "llvm/Target/TargetMachine.h"
19 #include "llvm/Target/TargetData.h"
20 #include "llvm/Target/TargetFrameInfo.h"
21 #include "ARMInstrInfo.h"
22 #include "ARMFrameInfo.h"
28 class ARMTargetMachine : public LLVMTargetMachine {
29 const TargetData DataLayout; // Calculates type size & alignment
30 ARMInstrInfo InstrInfo;
31 ARMFrameInfo FrameInfo;
34 virtual const TargetAsmInfo *createTargetAsmInfo() const;
37 ARMTargetMachine(const Module &M, const std::string &FS);
39 virtual const ARMInstrInfo *getInstrInfo() const { return &InstrInfo; }
40 virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
41 virtual const MRegisterInfo *getRegisterInfo() const {
42 return &InstrInfo.getRegisterInfo();
44 virtual const TargetData *getTargetData() const { return &DataLayout; }
45 static unsigned getModuleMatchQuality(const Module &M);
47 // Pass Pipeline Configuration
48 virtual bool addInstSelector(FunctionPassManager &PM, bool Fast);
49 virtual bool addPostRegAlloc(FunctionPassManager &PM, bool Fast);
50 virtual bool addAssemblyEmitter(FunctionPassManager &PM, bool Fast,
54 } // end namespace llvm