Move all of the header files which are involved in modelling the LLVM IR
[oota-llvm.git] / lib / Target / XCore / XCoreTargetMachine.h
1 //===-- XCoreTargetMachine.h - Define TargetMachine for XCore ---*- 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 XCore specific subclass of TargetMachine.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef XCORETARGETMACHINE_H
15 #define XCORETARGETMACHINE_H
16
17 #include "XCoreFrameLowering.h"
18 #include "XCoreISelLowering.h"
19 #include "XCoreInstrInfo.h"
20 #include "XCoreSelectionDAGInfo.h"
21 #include "XCoreSubtarget.h"
22 #include "llvm/IR/DataLayout.h"
23 #include "llvm/Target/TargetMachine.h"
24 #include "llvm/Target/TargetTransformImpl.h"
25
26 namespace llvm {
27
28 class XCoreTargetMachine : public LLVMTargetMachine {
29   XCoreSubtarget Subtarget;
30   const DataLayout DL;       // Calculates type size & alignment
31   XCoreInstrInfo InstrInfo;
32   XCoreFrameLowering FrameLowering;
33   XCoreTargetLowering TLInfo;
34   XCoreSelectionDAGInfo TSInfo;
35   ScalarTargetTransformImpl STTI;
36   VectorTargetTransformImpl VTTI;
37 public:
38   XCoreTargetMachine(const Target &T, StringRef TT,
39                      StringRef CPU, StringRef FS, const TargetOptions &Options,
40                      Reloc::Model RM, CodeModel::Model CM,
41                      CodeGenOpt::Level OL);
42
43   virtual const XCoreInstrInfo *getInstrInfo() const { return &InstrInfo; }
44   virtual const XCoreFrameLowering *getFrameLowering() const {
45     return &FrameLowering;
46   }
47   virtual const XCoreSubtarget *getSubtargetImpl() const { return &Subtarget; }
48   virtual const XCoreTargetLowering *getTargetLowering() const {
49     return &TLInfo;
50   }
51
52   virtual const XCoreSelectionDAGInfo* getSelectionDAGInfo() const {
53     return &TSInfo;
54   }
55
56   virtual const TargetRegisterInfo *getRegisterInfo() const {
57     return &InstrInfo.getRegisterInfo();
58   }
59   virtual const ScalarTargetTransformInfo *getScalarTargetTransformInfo()const {
60     return &STTI;
61   }
62   virtual const VectorTargetTransformInfo *getVectorTargetTransformInfo()const {
63     return &VTTI;
64   }
65   virtual const DataLayout       *getDataLayout() const { return &DL; }
66
67   // Pass Pipeline Configuration
68   virtual TargetPassConfig *createPassConfig(PassManagerBase &PM);
69 };
70
71 } // end namespace llvm
72
73 #endif