Misha Brukman | f2ccb77 | 2004-08-17 04:55:41 +0000 | [diff] [blame] | 1 | //===-- PPC32TargetMachine.h - Define TargetMachine for PowerPC -*- C++ -*-=// |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 2 | // |
| 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. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 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: |
| 31 | PPC32TargetMachine(const Module &M, IntrinsicLowering *IL); |
Misha Brukman | f2ccb77 | 2004-08-17 04:55:41 +0000 | [diff] [blame] | 32 | virtual const PPC32InstrInfo *getInstrInfo() const { return &InstrInfo; } |
| 33 | virtual const MRegisterInfo *getRegisterInfo() const { |
| 34 | return &InstrInfo.getRegisterInfo(); |
| 35 | } |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 36 | |
Chris Lattner | e4fce6f | 2004-11-23 05:56:40 +0000 | [diff] [blame] | 37 | virtual TargetJITInfo *getJITInfo() { |
| 38 | return &JITInfo; |
| 39 | } |
| 40 | |
| 41 | static unsigned getJITMatchQuality(); |
| 42 | |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 43 | static unsigned getModuleMatchQuality(const Module &M); |
Misha Brukman | f2ccb77 | 2004-08-17 04:55:41 +0000 | [diff] [blame] | 44 | |
| 45 | bool addPassesToEmitMachineCode(FunctionPassManager &PM, |
| 46 | MachineCodeEmitter &MCE); |
Misha Brukman | 3d9a6c2 | 2004-08-11 00:09:42 +0000 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | } // end namespace llvm |
| 50 | |
| 51 | #endif |