Completely rearchitect the interface between targets and the pass manager.
[oota-llvm.git] / lib / Target / IA64 / IA64TargetMachine.h
1 //===-- IA64TargetMachine.h - Define TargetMachine for IA64 ---*- C++ -*---===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by Duraid Madina and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the IA64 specific subclass of TargetMachine.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_TARGET_IA64TARGETMACHINE_H
15 #define LLVM_TARGET_IA64TARGETMACHINE_H
16
17 #include "llvm/Target/TargetMachine.h"
18 #include "llvm/Target/TargetData.h"
19 #include "llvm/Target/TargetFrameInfo.h"
20 #include "IA64InstrInfo.h"
21 #include "IA64ISelLowering.h"
22
23 namespace llvm {
24
25 class IA64TargetMachine : public LLVMTargetMachine {
26   const TargetData DataLayout;       // Calculates type size & alignment
27   IA64InstrInfo      InstrInfo;
28   TargetFrameInfo    FrameInfo;
29   //IA64JITInfo      JITInfo;
30   IA64TargetLowering TLInfo;
31 public:
32   IA64TargetMachine(const Module &M, const std::string &FS);
33
34   virtual const IA64InstrInfo      *getInstrInfo() const { return &InstrInfo; }
35   virtual const TargetFrameInfo    *getFrameInfo() const { return &FrameInfo; }
36   virtual       IA64TargetLowering *getTargetLowering() const { 
37     return const_cast<IA64TargetLowering*>(&TLInfo);
38   }
39   virtual const MRegisterInfo    *getRegisterInfo() const {
40     return &InstrInfo.getRegisterInfo();
41   }
42   virtual const TargetData       *getTargetData() const { return &DataLayout; }
43
44   static unsigned getModuleMatchQuality(const Module &M);
45
46   // Pass Pipeline Configuration
47   virtual bool addInstSelector(FunctionPassManager &PM, bool Fast);
48   virtual bool addPreEmitPass(FunctionPassManager &PM, bool Fast);
49   virtual bool addAssemblyEmitter(FunctionPassManager &PM, bool Fast, 
50                                   std::ostream &Out);
51 };
52 } // End llvm namespace
53
54 #endif
55
56