Fixing a bunch of -Woverloaded-virtual warnings due to hiding getSubtargetImpl from...
[oota-llvm.git] / lib / Target / ARM / ARMTargetMachine.h
1 //===-- ARMTargetMachine.h - Define TargetMachine for ARM -------*- 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 ARM specific subclass of TargetMachine.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_LIB_TARGET_ARM_ARMTARGETMACHINE_H
15 #define LLVM_LIB_TARGET_ARM_ARMTARGETMACHINE_H
16
17 #include "ARMInstrInfo.h"
18 #include "ARMSubtarget.h"
19 #include "llvm/IR/DataLayout.h"
20 #include "llvm/Target/TargetMachine.h"
21
22 namespace llvm {
23
24 class ARMBaseTargetMachine : public LLVMTargetMachine {
25 protected:
26   ARMSubtarget        Subtarget;
27 public:
28   ARMBaseTargetMachine(const Target &T, StringRef TT,
29                        StringRef CPU, StringRef FS,
30                        const TargetOptions &Options,
31                        Reloc::Model RM, CodeModel::Model CM,
32                        CodeGenOpt::Level OL,
33                        bool isLittle);
34
35   using LLVMTargetMachine::getSubtargetImpl;
36   const ARMSubtarget *getSubtargetImpl() const override { return &Subtarget; }
37
38   /// \brief Register ARM analysis passes with a pass manager.
39   void addAnalysisPasses(PassManagerBase &PM) override;
40
41   // Pass Pipeline Configuration
42   TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
43 };
44
45 /// ARMTargetMachine - ARM target machine.
46 ///
47 class ARMTargetMachine : public ARMBaseTargetMachine {
48   virtual void anchor();
49  public:
50    ARMTargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS,
51                     const TargetOptions &Options, Reloc::Model RM,
52                     CodeModel::Model CM, CodeGenOpt::Level OL, bool isLittle);
53 };
54
55 /// ARMLETargetMachine - ARM little endian target machine.
56 ///
57 class ARMLETargetMachine : public ARMTargetMachine {
58   void anchor() override;
59 public:
60   ARMLETargetMachine(const Target &T, StringRef TT,
61                      StringRef CPU, StringRef FS, const TargetOptions &Options,
62                      Reloc::Model RM, CodeModel::Model CM,
63                      CodeGenOpt::Level OL);
64 };
65
66 /// ARMBETargetMachine - ARM big endian target machine.
67 ///
68 class ARMBETargetMachine : public ARMTargetMachine {
69   void anchor() override;
70 public:
71   ARMBETargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS,
72                      const TargetOptions &Options, Reloc::Model RM,
73                      CodeModel::Model CM, CodeGenOpt::Level OL);
74 };
75
76 /// ThumbTargetMachine - Thumb target machine.
77 /// Due to the way architectures are handled, this represents both
78 ///   Thumb-1 and Thumb-2.
79 ///
80 class ThumbTargetMachine : public ARMBaseTargetMachine {
81   virtual void anchor();
82 public:
83   ThumbTargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS,
84                      const TargetOptions &Options, Reloc::Model RM,
85                      CodeModel::Model CM, CodeGenOpt::Level OL, bool isLittle);
86 };
87
88 /// ThumbLETargetMachine - Thumb little endian target machine.
89 ///
90 class ThumbLETargetMachine : public ThumbTargetMachine {
91   void anchor() override;
92 public:
93   ThumbLETargetMachine(const Target &T, StringRef TT, StringRef CPU,
94                        StringRef FS, const TargetOptions &Options,
95                        Reloc::Model RM, CodeModel::Model CM,
96                        CodeGenOpt::Level OL);
97 };
98
99 /// ThumbBETargetMachine - Thumb big endian target machine.
100 ///
101 class ThumbBETargetMachine : public ThumbTargetMachine {
102   void anchor() override;
103 public:
104   ThumbBETargetMachine(const Target &T, StringRef TT, StringRef CPU,
105                        StringRef FS, const TargetOptions &Options,
106                        Reloc::Model RM, CodeModel::Model CM,
107                        CodeGenOpt::Level OL);
108 };
109
110 } // end namespace llvm
111
112 #endif