Remove old style hacks to register AsmPrinter into TargetMachine.
[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 is distributed under the University of Illinois Open Source
6 // 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 #include "IA64Subtarget.h"
23
24 namespace llvm {
25
26 class IA64TargetMachine : public LLVMTargetMachine {
27   IA64Subtarget    Subtarget;
28   const TargetData DataLayout;       // Calculates type size & alignment
29   IA64InstrInfo      InstrInfo;
30   TargetFrameInfo    FrameInfo;
31   //IA64JITInfo      JITInfo;
32   IA64TargetLowering TLInfo;
33
34 protected:
35   virtual const TargetAsmInfo *createTargetAsmInfo() const;
36
37 public:
38   IA64TargetMachine(const Target &T, const Module &M, const std::string &FS);
39
40   virtual const IA64InstrInfo      *getInstrInfo() const { return &InstrInfo; }
41   virtual const TargetFrameInfo    *getFrameInfo() const { return &FrameInfo; }
42   virtual const IA64Subtarget  *getSubtargetImpl() const { return &Subtarget; }
43   virtual       IA64TargetLowering *getTargetLowering() const {
44     return const_cast<IA64TargetLowering*>(&TLInfo);
45   }
46   virtual const IA64RegisterInfo   *getRegisterInfo() const {
47     return &InstrInfo.getRegisterInfo();
48   }
49   virtual const TargetData       *getTargetData() const { return &DataLayout; }
50
51   // Pass Pipeline Configuration
52   virtual bool addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
53   virtual bool addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
54   virtual bool addAssemblyEmitter(PassManagerBase &PM,
55                                   CodeGenOpt::Level OptLevel,
56                                   bool Verbose, formatted_raw_ostream &Out);
57 };
58 } // End llvm namespace
59
60 #endif
61
62