Duraid Madina | 9b9d45f | 2005-03-17 18:17:03 +0000 | [diff] [blame] | 1 | //===-- IA64TargetMachine.h - Define TargetMachine for IA64 ---*- C++ -*---===// |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 2 | // |
Duraid Madina | 9b9d45f | 2005-03-17 18:17:03 +0000 | [diff] [blame] | 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. |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 7 | // |
Duraid Madina | 9b9d45f | 2005-03-17 18:17:03 +0000 | [diff] [blame] | 8 | //===----------------------------------------------------------------------===// |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 9 | // |
Duraid Madina | 9b9d45f | 2005-03-17 18:17:03 +0000 | [diff] [blame] | 10 | // This file declares the IA64 specific subclass of TargetMachine. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef IA64TARGETMACHINE_H |
| 15 | #define IA64TARGETMACHINE_H |
| 16 | |
| 17 | #include "llvm/Target/TargetMachine.h" |
Owen Anderson | 07000c6 | 2006-05-12 06:33:49 +0000 | [diff] [blame] | 18 | #include "llvm/Target/TargetData.h" |
Duraid Madina | 9b9d45f | 2005-03-17 18:17:03 +0000 | [diff] [blame] | 19 | #include "llvm/Target/TargetFrameInfo.h" |
| 20 | #include "llvm/PassManager.h" |
| 21 | #include "IA64InstrInfo.h" |
Evan Cheng | c4c6257 | 2006-03-13 23:20:37 +0000 | [diff] [blame] | 22 | #include "IA64ISelLowering.h" |
Duraid Madina | 9b9d45f | 2005-03-17 18:17:03 +0000 | [diff] [blame] | 23 | |
| 24 | namespace llvm { |
Duraid Madina | 9b9d45f | 2005-03-17 18:17:03 +0000 | [diff] [blame] | 25 | |
| 26 | class IA64TargetMachine : public TargetMachine { |
Owen Anderson | a69571c | 2006-05-03 01:29:57 +0000 | [diff] [blame] | 27 | const TargetData DataLayout; // Calculates type size & alignment |
Evan Cheng | c4c6257 | 2006-03-13 23:20:37 +0000 | [diff] [blame] | 28 | IA64InstrInfo InstrInfo; |
| 29 | TargetFrameInfo FrameInfo; |
Duraid Madina | 9b9d45f | 2005-03-17 18:17:03 +0000 | [diff] [blame] | 30 | //IA64JITInfo JITInfo; |
Evan Cheng | c4c6257 | 2006-03-13 23:20:37 +0000 | [diff] [blame] | 31 | IA64TargetLowering TLInfo; |
Duraid Madina | 9b9d45f | 2005-03-17 18:17:03 +0000 | [diff] [blame] | 32 | public: |
Chris Lattner | bc641b9 | 2006-03-23 05:43:16 +0000 | [diff] [blame] | 33 | IA64TargetMachine(const Module &M, const std::string &FS); |
Duraid Madina | 9b9d45f | 2005-03-17 18:17:03 +0000 | [diff] [blame] | 34 | |
Evan Cheng | c4c6257 | 2006-03-13 23:20:37 +0000 | [diff] [blame] | 35 | virtual const IA64InstrInfo *getInstrInfo() const { return &InstrInfo; } |
| 36 | virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; } |
Chris Lattner | 12d8f2b | 2006-05-12 23:26:11 +0000 | [diff] [blame] | 37 | virtual IA64TargetLowering *getTargetLowering() const { |
| 38 | return const_cast<IA64TargetLowering*>(&TLInfo); |
| 39 | } |
Duraid Madina | 9b9d45f | 2005-03-17 18:17:03 +0000 | [diff] [blame] | 40 | virtual const MRegisterInfo *getRegisterInfo() const { |
| 41 | return &InstrInfo.getRegisterInfo(); |
| 42 | } |
Owen Anderson | a69571c | 2006-05-03 01:29:57 +0000 | [diff] [blame] | 43 | virtual const TargetData *getTargetData() const { return &DataLayout; } |
Duraid Madina | 9b9d45f | 2005-03-17 18:17:03 +0000 | [diff] [blame] | 44 | |
Chris Lattner | 0431c96 | 2005-06-25 02:48:37 +0000 | [diff] [blame] | 45 | virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out, |
Chris Lattner | ce8eb0c | 2005-11-08 02:11:51 +0000 | [diff] [blame] | 46 | CodeGenFileType FileType, bool Fast); |
Duraid Madina | 9b9d45f | 2005-03-17 18:17:03 +0000 | [diff] [blame] | 47 | |
| 48 | static unsigned getModuleMatchQuality(const Module &M); |
| 49 | static unsigned compileTimeMatchQuality(void); |
| 50 | |
| 51 | }; |
| 52 | } // End llvm namespace |
| 53 | |
| 54 | #endif |
| 55 | |
| 56 | |