Remove the TargetMachine forwards for TargetSubtargetInfo based
[oota-llvm.git] / lib / Target / Sparc / SparcTargetMachine.h
1 //===-- SparcTargetMachine.h - Define TargetMachine for Sparc ---*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the Sparc specific subclass of TargetMachine.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef SPARCTARGETMACHINE_H
15 #define SPARCTARGETMACHINE_H
16
17 #include "SparcInstrInfo.h"
18 #include "SparcSubtarget.h"
19 #include "llvm/Target/TargetMachine.h"
20
21 namespace llvm {
22
23 class SparcTargetMachine : public LLVMTargetMachine {
24   SparcSubtarget Subtarget;
25 public:
26   SparcTargetMachine(const Target &T, StringRef TT,
27                      StringRef CPU, StringRef FS, const TargetOptions &Options,
28                      Reloc::Model RM, CodeModel::Model CM,
29                      CodeGenOpt::Level OL, bool is64bit);
30
31   const SparcSubtarget *getSubtargetImpl() const override { return &Subtarget; }
32   SparcSubtarget *getSubtargetImpl() override { return &Subtarget; }
33
34   // Pass Pipeline Configuration
35   TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
36   bool addCodeEmitter(PassManagerBase &PM, JITCodeEmitter &JCE) override;
37 };
38
39 /// SparcV8TargetMachine - Sparc 32-bit target machine
40 ///
41 class SparcV8TargetMachine : public SparcTargetMachine {
42   virtual void anchor();
43 public:
44   SparcV8TargetMachine(const Target &T, StringRef TT,
45                        StringRef CPU, StringRef FS,
46                        const TargetOptions &Options,
47                        Reloc::Model RM, CodeModel::Model CM,
48                        CodeGenOpt::Level OL);
49 };
50
51 /// SparcV9TargetMachine - Sparc 64-bit target machine
52 ///
53 class SparcV9TargetMachine : public SparcTargetMachine {
54   virtual void anchor();
55 public:
56   SparcV9TargetMachine(const Target &T, StringRef TT,
57                        StringRef CPU, StringRef FS,
58                        const TargetOptions &Options,
59                        Reloc::Model RM, CodeModel::Model CM,
60                        CodeGenOpt::Level OL);
61 };
62
63 } // end namespace llvm
64
65 #endif