Rip JIT specific stuff out of TargetMachine, as per PR176
[oota-llvm.git] / lib / Target / SparcV9 / SparcV9TargetMachine.h
1 //===-- SparcTargetMachine.h - Define TargetMachine for Sparc ---*- C++ -*-===//
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 // 
10 // This file declares the primary interface to machine description for the
11 // UltraSPARC.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef SPARC_TARGETMACHINE_H
16 #define SPARC_TARGETMACHINE_H
17
18 #include "llvm/PassManager.h"
19 #include "llvm/Target/TargetFrameInfo.h"
20 #include "llvm/Target/TargetMachine.h"
21 #include "SparcInstrInfo.h"
22 #include "SparcInternals.h"
23 #include "SparcRegInfo.h"
24 #include "SparcFrameInfo.h"
25 #include "SparcJITInfo.h"
26
27 namespace llvm {
28
29 class SparcTargetMachine : public TargetMachine {
30   SparcInstrInfo instrInfo;
31   SparcSchedInfo schedInfo;
32   SparcRegInfo   regInfo;
33   SparcFrameInfo frameInfo;
34   SparcCacheInfo cacheInfo;
35   SparcJITInfo   jitInfo;
36 public:
37   SparcTargetMachine();
38
39   virtual const TargetInstrInfo  &getInstrInfo() const { return instrInfo; }
40   virtual const TargetSchedInfo  &getSchedInfo() const { return schedInfo; }
41   virtual const TargetRegInfo    &getRegInfo()   const { return regInfo; }
42   virtual const TargetFrameInfo  &getFrameInfo() const { return frameInfo; }
43   virtual const TargetCacheInfo  &getCacheInfo() const { return cacheInfo; }
44   virtual       TargetJITInfo    *getJITInfo()         { return &jitInfo; }
45
46   virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
47   virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
48                                           MachineCodeEmitter &MCE);
49 };
50
51 } // End llvm namespace
52
53 #endif