]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/llvm/lib/Target/AArch64/AArch64TargetMachine.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / llvm / lib / Target / AArch64 / AArch64TargetMachine.h
1 //=== AArch64TargetMachine.h - Define TargetMachine for AArch64 -*- 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 AArch64 specific subclass of TargetMachine.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_AARCH64TARGETMACHINE_H
15 #define LLVM_AARCH64TARGETMACHINE_H
16
17 #include "AArch64FrameLowering.h"
18 #include "AArch64ISelLowering.h"
19 #include "AArch64InstrInfo.h"
20 #include "AArch64SelectionDAGInfo.h"
21 #include "AArch64Subtarget.h"
22 #include "llvm/IR/DataLayout.h"
23 #include "llvm/Target/TargetMachine.h"
24
25 namespace llvm {
26
27 class AArch64TargetMachine : public LLVMTargetMachine {
28   AArch64Subtarget          Subtarget;
29   AArch64InstrInfo          InstrInfo;
30   const DataLayout          DL;
31   AArch64TargetLowering     TLInfo;
32   AArch64SelectionDAGInfo   TSInfo;
33   AArch64FrameLowering      FrameLowering;
34
35 public:
36   AArch64TargetMachine(const Target &T, StringRef TT, StringRef CPU,
37                        StringRef FS, const TargetOptions &Options,
38                        Reloc::Model RM, CodeModel::Model CM,
39                        CodeGenOpt::Level OL);
40
41   const AArch64InstrInfo *getInstrInfo() const {
42     return &InstrInfo;
43   }
44
45   const AArch64FrameLowering *getFrameLowering() const {
46     return &FrameLowering;
47   }
48
49   const AArch64TargetLowering *getTargetLowering() const {
50     return &TLInfo;
51   }
52
53   const AArch64SelectionDAGInfo *getSelectionDAGInfo() const {
54     return &TSInfo;
55   }
56
57   const AArch64Subtarget *getSubtargetImpl() const { return &Subtarget; }
58
59   const DataLayout *getDataLayout() const { return &DL; }
60
61   const TargetRegisterInfo *getRegisterInfo() const {
62     return &InstrInfo.getRegisterInfo();
63   }
64   TargetPassConfig *createPassConfig(PassManagerBase &PM);
65 };
66
67 }
68
69 #endif