1 //==- SystemZTargetMachine.h - Define TargetMachine for SystemZ ---*- 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 SystemZ specific subclass of TargetMachine.
12 //===----------------------------------------------------------------------===//
15 #ifndef SYSTEMZTARGETMACHINE_H
16 #define SYSTEMZTARGETMACHINE_H
18 #include "SystemZFrameLowering.h"
19 #include "SystemZISelLowering.h"
20 #include "SystemZInstrInfo.h"
21 #include "SystemZRegisterInfo.h"
22 #include "SystemZSelectionDAGInfo.h"
23 #include "SystemZSubtarget.h"
24 #include "llvm/IR/DataLayout.h"
25 #include "llvm/Target/TargetFrameLowering.h"
26 #include "llvm/Target/TargetMachine.h"
30 class SystemZTargetMachine : public LLVMTargetMachine {
31 SystemZSubtarget Subtarget;
33 SystemZInstrInfo InstrInfo;
34 SystemZTargetLowering TLInfo;
35 SystemZSelectionDAGInfo TSInfo;
36 SystemZFrameLowering FrameLowering;
39 SystemZTargetMachine(const Target &T, StringRef TT, StringRef CPU,
40 StringRef FS, const TargetOptions &Options,
41 Reloc::Model RM, CodeModel::Model CM,
42 CodeGenOpt::Level OL);
44 // Override TargetMachine.
45 virtual const TargetFrameLowering *getFrameLowering() const override {
46 return &FrameLowering;
48 virtual const SystemZInstrInfo *getInstrInfo() const override {
51 virtual const SystemZSubtarget *getSubtargetImpl() const override {
54 virtual const DataLayout *getDataLayout() const override {
57 virtual const SystemZRegisterInfo *getRegisterInfo() const override {
58 return &InstrInfo.getRegisterInfo();
60 virtual const SystemZTargetLowering *getTargetLowering() const override {
63 virtual const TargetSelectionDAGInfo *getSelectionDAGInfo() const override {
67 // Override LLVMTargetMachine
68 virtual TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
71 } // end namespace llvm