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 "SystemZSubtarget.h"
23
#include "llvm/IR/DataLayout.h"
24
#include "llvm/Target/TargetFrameLowering.h"
25
#include "llvm/Target/TargetMachine.h"
26
#include "llvm/Target/TargetSelectionDAGInfo.h"
30
class SystemZTargetMachine : public LLVMTargetMachine {
31
SystemZSubtarget Subtarget;
33
SystemZInstrInfo InstrInfo;
34
SystemZTargetLowering TLInfo;
35
TargetSelectionDAGInfo 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 LLVM_OVERRIDE {
46
return &FrameLowering;
48
virtual const SystemZInstrInfo *getInstrInfo() const LLVM_OVERRIDE {
51
virtual const SystemZSubtarget *getSubtargetImpl() const LLVM_OVERRIDE {
54
virtual const DataLayout *getDataLayout() const LLVM_OVERRIDE {
57
virtual const SystemZRegisterInfo *getRegisterInfo() const LLVM_OVERRIDE {
58
return &InstrInfo.getRegisterInfo();
60
virtual const SystemZTargetLowering *getTargetLowering() const LLVM_OVERRIDE {
63
virtual const TargetSelectionDAGInfo *getSelectionDAGInfo() const
68
// Override LLVMTargetMachine
69
virtual TargetPassConfig *createPassConfig(PassManagerBase &PM) LLVM_OVERRIDE;
72
} // end namespace llvm