blob: fee86b7943ba7a411cdf889cfc646aa11a6ae690 [file] [log] [blame]
Tim Northover00ed9962014-03-29 10:18:08 +00001//===-- ARM64TargetMachine.h - Define TargetMachine for ARM64 ---*- 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 ARM64 specific subclass of TargetMachine.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef ARM64TARGETMACHINE_H
15#define ARM64TARGETMACHINE_H
16
17#include "ARM64InstrInfo.h"
18#include "ARM64ISelLowering.h"
19#include "ARM64Subtarget.h"
20#include "ARM64FrameLowering.h"
21#include "ARM64SelectionDAGInfo.h"
22#include "llvm/IR/DataLayout.h"
23#include "llvm/Target/TargetMachine.h"
24#include "llvm/MC/MCStreamer.h"
25
26namespace llvm {
27
28class ARM64TargetMachine : public LLVMTargetMachine {
29protected:
30 ARM64Subtarget Subtarget;
31
32private:
33 const DataLayout DL;
34 ARM64InstrInfo InstrInfo;
35 ARM64TargetLowering TLInfo;
36 ARM64FrameLowering FrameLowering;
37 ARM64SelectionDAGInfo TSInfo;
38
39public:
40 ARM64TargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS,
41 const TargetOptions &Options, Reloc::Model RM,
42 CodeModel::Model CM, CodeGenOpt::Level OL);
43
44 virtual const ARM64Subtarget *getSubtargetImpl() const { return &Subtarget; }
45 virtual const ARM64TargetLowering *getTargetLowering() const {
46 return &TLInfo;
47 }
48 virtual const DataLayout *getDataLayout() const { return &DL; }
49 virtual const ARM64FrameLowering *getFrameLowering() const {
50 return &FrameLowering;
51 }
52 virtual const ARM64InstrInfo *getInstrInfo() const { return &InstrInfo; }
53 virtual const ARM64RegisterInfo *getRegisterInfo() const {
54 return &InstrInfo.getRegisterInfo();
55 }
56 virtual const ARM64SelectionDAGInfo *getSelectionDAGInfo() const {
57 return &TSInfo;
58 }
59
60 // Pass Pipeline Configuration
61 virtual TargetPassConfig *createPassConfig(PassManagerBase &PM);
62
63 /// \brief Register ARM64 analysis passes with a pass manager.
64 virtual void addAnalysisPasses(PassManagerBase &PM);
65};
66
67} // end namespace llvm
68
69#endif