1251607Sdim//==- SystemZTargetMachine.h - Define TargetMachine for SystemZ ---*- C++ -*-=//
2251607Sdim//
3251607Sdim//                     The LLVM Compiler Infrastructure
4251607Sdim//
5251607Sdim// This file is distributed under the University of Illinois Open Source
6251607Sdim// License. See LICENSE.TXT for details.
7251607Sdim//
8251607Sdim//===----------------------------------------------------------------------===//
9251607Sdim//
10251607Sdim// This file declares the SystemZ specific subclass of TargetMachine.
11251607Sdim//
12251607Sdim//===----------------------------------------------------------------------===//
13251607Sdim
14251607Sdim
15280031Sdim#ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZTARGETMACHINE_H
16280031Sdim#define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZTARGETMACHINE_H
17251607Sdim
18251607Sdim#include "SystemZSubtarget.h"
19251607Sdim#include "llvm/Target/TargetMachine.h"
20251607Sdim
21251607Sdimnamespace llvm {
22251607Sdim
23276479Sdimclass TargetFrameLowering;
24276479Sdim
25251607Sdimclass SystemZTargetMachine : public LLVMTargetMachine {
26280031Sdim  std::unique_ptr<TargetLoweringObjectFile> TLOF;
27251607Sdim  SystemZSubtarget        Subtarget;
28251607Sdim
29251607Sdimpublic:
30288943Sdim  SystemZTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
31251607Sdim                       StringRef FS, const TargetOptions &Options,
32251607Sdim                       Reloc::Model RM, CodeModel::Model CM,
33251607Sdim                       CodeGenOpt::Level OL);
34280031Sdim  ~SystemZTargetMachine() override;
35251607Sdim
36288943Sdim  const SystemZSubtarget *getSubtargetImpl() const { return &Subtarget; }
37288943Sdim  const SystemZSubtarget *getSubtargetImpl(const Function &) const override {
38251607Sdim    return &Subtarget;
39251607Sdim  }
40251607Sdim  // Override LLVMTargetMachine
41276479Sdim  TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
42288943Sdim  TargetIRAnalysis getTargetIRAnalysis() override;
43280031Sdim  TargetLoweringObjectFile *getObjFileLowering() const override {
44280031Sdim    return TLOF.get();
45280031Sdim  }
46296417Sdim
47296417Sdim  bool targetSchedulesPostRAScheduling() const override { return true; };
48296417Sdim
49251607Sdim};
50251607Sdim
51251607Sdim} // end namespace llvm
52251607Sdim
53251607Sdim#endif
54