Brian Gaeke | e785e53 | 2004-02-25 19:28:19 +0000 | [diff] [blame] | 1 | //===-- SparcV8TargetMachine.h - Define TargetMachine for SparcV8 -*- C++ -*-=// |
Misha Brukman | b5f662f | 2005-04-21 23:30:14 +0000 | [diff] [blame] | 2 | // |
Brian Gaeke | e785e53 | 2004-02-25 19:28:19 +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 | // |
Brian Gaeke | e785e53 | 2004-02-25 19:28:19 +0000 | [diff] [blame] | 8 | //===----------------------------------------------------------------------===// |
Misha Brukman | b5f662f | 2005-04-21 23:30:14 +0000 | [diff] [blame] | 9 | // |
Brian Gaeke | e785e53 | 2004-02-25 19:28:19 +0000 | [diff] [blame] | 10 | // This file declares the SparcV8 specific subclass of TargetMachine. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef SPARCV8TARGETMACHINE_H |
| 15 | #define SPARCV8TARGETMACHINE_H |
| 16 | |
| 17 | #include "llvm/Target/TargetMachine.h" |
| 18 | #include "llvm/Target/TargetFrameInfo.h" |
| 19 | #include "llvm/PassManager.h" |
| 20 | #include "SparcV8InstrInfo.h" |
| 21 | #include "SparcV8JITInfo.h" |
| 22 | |
| 23 | namespace llvm { |
| 24 | |
| 25 | class IntrinsicLowering; |
Brian Gaeke | 0e2d466 | 2004-10-09 05:57:01 +0000 | [diff] [blame] | 26 | class Module; |
Brian Gaeke | e785e53 | 2004-02-25 19:28:19 +0000 | [diff] [blame] | 27 | |
| 28 | class SparcV8TargetMachine : public TargetMachine { |
| 29 | SparcV8InstrInfo InstrInfo; |
| 30 | TargetFrameInfo FrameInfo; |
| 31 | SparcV8JITInfo JITInfo; |
| 32 | public: |
Jim Laskey | b1e1180 | 2005-09-01 21:38:21 +0000 | [diff] [blame] | 33 | SparcV8TargetMachine(const Module &M, IntrinsicLowering *IL, |
| 34 | const std::string &FS); |
Brian Gaeke | e785e53 | 2004-02-25 19:28:19 +0000 | [diff] [blame] | 35 | |
Chris Lattner | 143e0ea | 2004-06-02 05:47:26 +0000 | [diff] [blame] | 36 | virtual const SparcV8InstrInfo *getInstrInfo() const { return &InstrInfo; } |
| 37 | virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; } |
Brian Gaeke | e785e53 | 2004-02-25 19:28:19 +0000 | [diff] [blame] | 38 | virtual const MRegisterInfo *getRegisterInfo() const { |
| 39 | return &InstrInfo.getRegisterInfo(); |
| 40 | } |
| 41 | virtual TargetJITInfo *getJITInfo() { |
| 42 | return &JITInfo; |
| 43 | } |
| 44 | |
Brian Gaeke | 0e2d466 | 2004-10-09 05:57:01 +0000 | [diff] [blame] | 45 | static unsigned getModuleMatchQuality(const Module &M); |
| 46 | static unsigned getJITMatchQuality(); |
| 47 | |
Brian Gaeke | e785e53 | 2004-02-25 19:28:19 +0000 | [diff] [blame] | 48 | virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM, |
| 49 | MachineCodeEmitter &MCE); |
Misha Brukman | b5f662f | 2005-04-21 23:30:14 +0000 | [diff] [blame] | 50 | |
Chris Lattner | 0431c96 | 2005-06-25 02:48:37 +0000 | [diff] [blame] | 51 | virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out, |
Chris Lattner | ce8eb0c | 2005-11-08 02:11:51 +0000 | [diff] [blame^] | 52 | CodeGenFileType FileType, bool Fast); |
Brian Gaeke | e785e53 | 2004-02-25 19:28:19 +0000 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | } // end namespace llvm |
| 56 | |
| 57 | #endif |