blob: 18467a4e6658d87c4a5998c9a7fdea0940b443f5 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001//===-- IA64TargetMachine.h - Define TargetMachine for IA64 ---*- C++ -*---===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner081ce942007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007//
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
23namespace llvm {
24
25class IA64TargetMachine : public LLVMTargetMachine {
26 const TargetData DataLayout; // Calculates type size & alignment
27 IA64InstrInfo InstrInfo;
28 TargetFrameInfo FrameInfo;
29 //IA64JITInfo JITInfo;
30 IA64TargetLowering TLInfo;
31
32protected:
33 virtual const TargetAsmInfo *createTargetAsmInfo() const;
34
35public:
36 IA64TargetMachine(const Module &M, const std::string &FS);
37
38 virtual const IA64InstrInfo *getInstrInfo() const { return &InstrInfo; }
39 virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
40 virtual IA64TargetLowering *getTargetLowering() const {
41 return const_cast<IA64TargetLowering*>(&TLInfo);
42 }
Dan Gohmanb41dfba2008-05-14 01:58:56 +000043 virtual const IA64RegisterInfo *getRegisterInfo() const {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000044 return &InstrInfo.getRegisterInfo();
45 }
46 virtual const TargetData *getTargetData() const { return &DataLayout; }
47
48 static unsigned getModuleMatchQuality(const Module &M);
49
50 // Pass Pipeline Configuration
Dan Gohmane34aa772008-03-11 22:29:46 +000051 virtual bool addInstSelector(PassManagerBase &PM, bool Fast);
52 virtual bool addPreEmitPass(PassManagerBase &PM, bool Fast);
53 virtual bool addAssemblyEmitter(PassManagerBase &PM, bool Fast,
Owen Anderson847b99b2008-08-21 00:14:44 +000054 raw_ostream &Out);
Dan Gohmanf17a25c2007-07-18 16:29:46 +000055};
56} // End llvm namespace
57
58#endif
59
60