Silence -Wunused-variable in release builds.
[llvm/stm8.git] / lib / Target / Mips / MipsTargetMachine.h
bloba021af2ff16df1613a11b2263c5031490181506f
1 //===-- MipsTargetMachine.h - Define TargetMachine for Mips -00--*- 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 Mips specific subclass of TargetMachine.
12 //===----------------------------------------------------------------------===//
14 #ifndef MIPSTARGETMACHINE_H
15 #define MIPSTARGETMACHINE_H
17 #include "MipsSubtarget.h"
18 #include "MipsInstrInfo.h"
19 #include "MipsISelLowering.h"
20 #include "MipsFrameLowering.h"
21 #include "MipsSelectionDAGInfo.h"
22 #include "llvm/Target/TargetMachine.h"
23 #include "llvm/Target/TargetData.h"
24 #include "llvm/Target/TargetFrameLowering.h"
26 namespace llvm {
27 class formatted_raw_ostream;
29 class MipsTargetMachine : public LLVMTargetMachine {
30 MipsSubtarget Subtarget;
31 const TargetData DataLayout; // Calculates type size & alignment
32 MipsInstrInfo InstrInfo;
33 MipsFrameLowering FrameLowering;
34 MipsTargetLowering TLInfo;
35 MipsSelectionDAGInfo TSInfo;
36 public:
37 MipsTargetMachine(const Target &T, const std::string &TT,
38 const std::string &CPU, const std::string &FS,
39 bool isLittle);
41 virtual const MipsInstrInfo *getInstrInfo() const
42 { return &InstrInfo; }
43 virtual const TargetFrameLowering *getFrameLowering() const
44 { return &FrameLowering; }
45 virtual const MipsSubtarget *getSubtargetImpl() const
46 { return &Subtarget; }
47 virtual const TargetData *getTargetData() const
48 { return &DataLayout;}
50 virtual const MipsRegisterInfo *getRegisterInfo() const {
51 return &InstrInfo.getRegisterInfo();
54 virtual const MipsTargetLowering *getTargetLowering() const {
55 return &TLInfo;
58 virtual const MipsSelectionDAGInfo* getSelectionDAGInfo() const {
59 return &TSInfo;
62 // Pass Pipeline Configuration
63 virtual bool addInstSelector(PassManagerBase &PM,
64 CodeGenOpt::Level OptLevel);
65 virtual bool addPreEmitPass(PassManagerBase &PM,
66 CodeGenOpt::Level OptLevel);
67 virtual bool addPreRegAlloc(PassManagerBase &PM,
68 CodeGenOpt::Level OptLevel);
69 virtual bool addPostRegAlloc(PassManagerBase &, CodeGenOpt::Level);
72 /// MipselTargetMachine - Mipsel target machine.
73 ///
74 class MipselTargetMachine : public MipsTargetMachine {
75 public:
76 MipselTargetMachine(const Target &T, const std::string &TT,
77 const std::string &CPU, const std::string &FS);
80 } // End llvm namespace
82 #endif