blob: 97d1f22d0c9e1565051da0d8261fe2baebde9995 [file] [log] [blame]
Rafael Espindola7bc59bc2006-05-14 22:18:28 +00001//===-- ARMTargetMachine.h - Define TargetMachine for ARM -------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
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.
8//
9//===----------------------------------------------------------------------===//
10//
11// This file declares the ARM specific subclass of TargetMachine.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef ARMTARGETMACHINE_H
16#define ARMTARGETMACHINE_H
17
18#include "llvm/Target/TargetMachine.h"
19#include "llvm/Target/TargetData.h"
20#include "llvm/Target/TargetFrameInfo.h"
21#include "llvm/PassManager.h"
22#include "ARMInstrInfo.h"
23
24namespace llvm {
25
26class Module;
27
28class ARMTargetMachine : public TargetMachine {
29 const TargetData DataLayout; // Calculates type size & alignment
30 ARMInstrInfo InstrInfo;
31 TargetFrameInfo FrameInfo;
32public:
33 ARMTargetMachine(const Module &M, const std::string &FS);
34
35 virtual const ARMInstrInfo *getInstrInfo() const { return &InstrInfo; }
36 virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
37 virtual const MRegisterInfo *getRegisterInfo() const {
38 return &InstrInfo.getRegisterInfo();
39 }
40 virtual const TargetData *getTargetData() const { return &DataLayout; }
41 static unsigned getModuleMatchQuality(const Module &M);
42
43 virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
44 CodeGenFileType FileType, bool Fast);
45};
46
47} // end namespace llvm
48
49#endif