1 //===-- IA64TargetMachine.h - Define TargetMachine for IA64 ---*- C++ -*---===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the IA64 specific subclass of TargetMachine.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TARGET_IA64TARGETMACHINE_H
15 #define LLVM_TARGET_IA64TARGETMACHINE_H
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"
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;
35 virtual const TargetAsmInfo *createTargetAsmInfo() const;
38 IA64TargetMachine(const Module &M, const std::string &FS);
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);
46 virtual const IA64RegisterInfo *getRegisterInfo() const {
47 return &InstrInfo.getRegisterInfo();
49 virtual const TargetData *getTargetData() const { return &DataLayout; }
51 static unsigned getModuleMatchQuality(const Module &M);
53 // Pass Pipeline Configuration
54 virtual bool addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
55 virtual bool addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
56 virtual bool addAssemblyEmitter(PassManagerBase &PM,
57 CodeGenOpt::Level OptLevel,
58 bool Verbose, raw_ostream &Out);
60 } // End llvm namespace