Fixed some bugs in register stack pass.
[llvm/zpu.git] / lib / Target / Blackfin / BlackfinTargetMachine.h
bloba63aa54b9f55216e1c5f2c60fcadf0e944a13b34
1 //===-- BlackfinTargetMachine.h - TargetMachine for Blackfin ----*- 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 Blackfin specific subclass of TargetMachine.
12 //===----------------------------------------------------------------------===//
14 #ifndef BLACKFINTARGETMACHINE_H
15 #define BLACKFINTARGETMACHINE_H
17 #include "llvm/Target/TargetMachine.h"
18 #include "llvm/Target/TargetData.h"
19 #include "llvm/Target/TargetFrameInfo.h"
20 #include "BlackfinInstrInfo.h"
21 #include "BlackfinSubtarget.h"
22 #include "BlackfinISelLowering.h"
23 #include "BlackfinSelectionDAGInfo.h"
24 #include "BlackfinIntrinsicInfo.h"
26 namespace llvm {
28 class BlackfinTargetMachine : public LLVMTargetMachine {
29 const TargetData DataLayout;
30 BlackfinSubtarget Subtarget;
31 BlackfinTargetLowering TLInfo;
32 BlackfinSelectionDAGInfo TSInfo;
33 BlackfinInstrInfo InstrInfo;
34 TargetFrameInfo FrameInfo;
35 BlackfinIntrinsicInfo IntrinsicInfo;
36 public:
37 BlackfinTargetMachine(const Target &T, const std::string &TT,
38 const std::string &FS);
40 virtual const BlackfinInstrInfo *getInstrInfo() const { return &InstrInfo; }
41 virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
42 virtual const BlackfinSubtarget *getSubtargetImpl() const {
43 return &Subtarget;
45 virtual const BlackfinRegisterInfo *getRegisterInfo() const {
46 return &InstrInfo.getRegisterInfo();
48 virtual const BlackfinTargetLowering* getTargetLowering() const {
49 return &TLInfo;
51 virtual const BlackfinSelectionDAGInfo* getSelectionDAGInfo() const {
52 return &TSInfo;
54 virtual const TargetData *getTargetData() const { return &DataLayout; }
55 virtual bool addInstSelector(PassManagerBase &PM,
56 CodeGenOpt::Level OptLevel);
57 const TargetIntrinsicInfo *getIntrinsicInfo() const {
58 return &IntrinsicInfo;
62 } // end namespace llvm
64 #endif