Misha Brukman | f2ccb77 | 2004-08-17 04:55:41 +0000 | [diff] [blame] | 1 | //===-- PPC32TargetMachine.h - Define TargetMachine for PowerPC -*- C++ -*-=// |
Misha Brukman | b5f662f | 2005-04-21 23:30:14 +0000 | [diff] [blame] | 2 | // |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file was developed by the LLVM research group and is distributed under |
| 6 | // the University of Illinois Open Source License. See LICENSE.TXT for details. |
Misha Brukman | b5f662f | 2005-04-21 23:30:14 +0000 | [diff] [blame] | 7 | // |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 8 | //===----------------------------------------------------------------------===// |
Misha Brukman | b5f662f | 2005-04-21 23:30:14 +0000 | [diff] [blame] | 9 | // |
Misha Brukman | f2ccb77 | 2004-08-17 04:55:41 +0000 | [diff] [blame] | 10 | // This file declares the PowerPC specific subclass of TargetMachine. |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
Misha Brukman | f2ccb77 | 2004-08-17 04:55:41 +0000 | [diff] [blame] | 14 | #ifndef POWERPC32_TARGETMACHINE_H |
| 15 | #define POWERPC32_TARGETMACHINE_H |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 16 | |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 17 | #include "PowerPCTargetMachine.h" |
Chris Lattner | e4fce6f | 2004-11-23 05:56:40 +0000 | [diff] [blame] | 18 | #include "PPC32JITInfo.h" |
Misha Brukman | f2ccb77 | 2004-08-17 04:55:41 +0000 | [diff] [blame] | 19 | #include "PPC32InstrInfo.h" |
| 20 | #include "llvm/PassManager.h" |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 21 | |
| 22 | namespace llvm { |
| 23 | |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 24 | class IntrinsicLowering; |
| 25 | |
| 26 | class PPC32TargetMachine : public PowerPCTargetMachine { |
Misha Brukman | f2ccb77 | 2004-08-17 04:55:41 +0000 | [diff] [blame] | 27 | PPC32InstrInfo InstrInfo; |
Chris Lattner | e4fce6f | 2004-11-23 05:56:40 +0000 | [diff] [blame] | 28 | PPC32JITInfo JITInfo; |
Misha Brukman | f2ccb77 | 2004-08-17 04:55:41 +0000 | [diff] [blame] | 29 | |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 30 | public: |
Jim Laskey | b1e1180 | 2005-09-01 21:38:21 +0000 | [diff] [blame^] | 31 | PPC32TargetMachine(const Module &M, IntrinsicLowering *IL, |
| 32 | const std::string &FS); |
Misha Brukman | f2ccb77 | 2004-08-17 04:55:41 +0000 | [diff] [blame] | 33 | virtual const PPC32InstrInfo *getInstrInfo() const { return &InstrInfo; } |
| 34 | virtual const MRegisterInfo *getRegisterInfo() const { |
| 35 | return &InstrInfo.getRegisterInfo(); |
| 36 | } |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 37 | |
Chris Lattner | e4fce6f | 2004-11-23 05:56:40 +0000 | [diff] [blame] | 38 | virtual TargetJITInfo *getJITInfo() { |
| 39 | return &JITInfo; |
| 40 | } |
| 41 | |
| 42 | static unsigned getJITMatchQuality(); |
| 43 | |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 44 | static unsigned getModuleMatchQuality(const Module &M); |
Misha Brukman | f2ccb77 | 2004-08-17 04:55:41 +0000 | [diff] [blame] | 45 | |
| 46 | bool addPassesToEmitMachineCode(FunctionPassManager &PM, |
| 47 | MachineCodeEmitter &MCE); |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 48 | }; |
| 49 | |
| 50 | } // end namespace llvm |
| 51 | |
| 52 | #endif |