Trailing whitespace.
[oota-llvm.git] / lib / Target / PTX / PTXTargetMachine.h
1 //===-- PTXTargetMachine.h - Define TargetMachine for PTX -------*- 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 PTX specific subclass of TargetMachine.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef PTX_TARGET_MACHINE_H
15 #define PTX_TARGET_MACHINE_H
16
17 #include "PTXISelLowering.h"
18 #include "PTXInstrInfo.h"
19 #include "PTXSubtarget.h"
20 #include "llvm/Target/TargetData.h"
21 #include "llvm/Target/TargetFrameInfo.h"
22 #include "llvm/Target/TargetMachine.h"
23
24 namespace llvm {
25 class PTXTargetMachine : public LLVMTargetMachine {
26   private:
27     const TargetData DataLayout;
28     TargetFrameInfo FrameInfo;
29     PTXInstrInfo InstrInfo;
30     PTXTargetLowering TLInfo;
31     PTXSubtarget Subtarget;
32
33   public:
34     PTXTargetMachine(const Target &T, const std::string &TT,
35                      const std::string &FS);
36
37     virtual const TargetData *getTargetData() const { return &DataLayout; }
38
39     virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
40
41     virtual const PTXInstrInfo *getInstrInfo() const { return &InstrInfo; }
42     virtual const TargetRegisterInfo *getRegisterInfo() const {
43       return &InstrInfo.getRegisterInfo(); }
44
45     virtual const PTXTargetLowering *getTargetLowering() const {
46       return &TLInfo; }
47
48     virtual const PTXSubtarget *getSubtargetImpl() const { return &Subtarget; }
49
50     virtual bool addInstSelector(PassManagerBase &PM,
51                                  CodeGenOpt::Level OptLevel);
52 }; // class PTXTargetMachine
53 } // namespace llvm
54
55 #endif // PTX_TARGET_MACHINE_H