blob: f4dbae2680ce61d109a0d47785f794b88a759449 [file] [log] [blame]
Ulrich Weigand5f613df2013-05-06 16:15:19 +00001//==- SystemZTargetMachine.h - Define TargetMachine for SystemZ ---*- 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 SystemZ specific subclass of TargetMachine.
11//
12//===----------------------------------------------------------------------===//
13
14
Benjamin Kramera7c40ef2014-08-13 16:26:38 +000015#ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZTARGETMACHINE_H
16#define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZTARGETMACHINE_H
Ulrich Weigand5f613df2013-05-06 16:15:19 +000017
Chandler Carruth8a8cd2b2014-01-07 11:48:04 +000018#include "SystemZSubtarget.h"
Ulrich Weigand5f613df2013-05-06 16:15:19 +000019#include "llvm/Target/TargetMachine.h"
Ulrich Weigand5f613df2013-05-06 16:15:19 +000020
21namespace llvm {
22
Eric Christopher52349952014-07-01 20:19:02 +000023class TargetFrameLowering;
24
Ulrich Weigand5f613df2013-05-06 16:15:19 +000025class SystemZTargetMachine : public LLVMTargetMachine {
Aditya Nandakumara2719322014-11-13 09:26:31 +000026 std::unique_ptr<TargetLoweringObjectFile> TLOF;
Ulrich Weigand5f613df2013-05-06 16:15:19 +000027 SystemZSubtarget Subtarget;
Ulrich Weigand5f613df2013-05-06 16:15:19 +000028
29public:
30 SystemZTargetMachine(const Target &T, StringRef TT, StringRef CPU,
31 StringRef FS, const TargetOptions &Options,
32 Reloc::Model RM, CodeModel::Model CM,
33 CodeGenOpt::Level OL);
34
35 // Override TargetMachine.
Richard Sandifordb4d67b52014-03-06 12:03:36 +000036 const SystemZSubtarget *getSubtargetImpl() const override {
Ulrich Weigand5f613df2013-05-06 16:15:19 +000037 return &Subtarget;
38 }
Ulrich Weigand5f613df2013-05-06 16:15:19 +000039 // Override LLVMTargetMachine
Richard Sandifordb4d67b52014-03-06 12:03:36 +000040 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
Aditya Nandakumara2719322014-11-13 09:26:31 +000041 TargetLoweringObjectFile *getObjFileLowering() const override {
42 return TLOF.get();
43 }
Ulrich Weigand5f613df2013-05-06 16:15:19 +000044};
45
46} // end namespace llvm
47
48#endif