1 //=== AArch64TargetMachine.h - Define TargetMachine for AArch64 -*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the AArch64 specific subclass of TargetMachine.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_AARCH64TARGETMACHINE_H
15 #define LLVM_AARCH64TARGETMACHINE_H
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"
27 class AArch64TargetMachine : public LLVMTargetMachine {
28 AArch64Subtarget Subtarget;
29 AArch64InstrInfo InstrInfo;
31 AArch64TargetLowering TLInfo;
32 AArch64SelectionDAGInfo TSInfo;
33 AArch64FrameLowering FrameLowering;
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);
41 const AArch64InstrInfo *getInstrInfo() const {
45 const AArch64FrameLowering *getFrameLowering() const {
46 return &FrameLowering;
49 const AArch64TargetLowering *getTargetLowering() const {
53 const AArch64SelectionDAGInfo *getSelectionDAGInfo() const {
57 const AArch64Subtarget *getSubtargetImpl() const { return &Subtarget; }
59 const DataLayout *getDataLayout() const { return &DL; }
61 const TargetRegisterInfo *getRegisterInfo() const {
62 return &InstrInfo.getRegisterInfo();
64 TargetPassConfig *createPassConfig(PassManagerBase &PM);