Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 1 | //==- 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 Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame] | 15 | #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZTARGETMACHINE_H |
| 16 | #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZTARGETMACHINE_H |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 17 | |
Chandler Carruth | 8a8cd2b | 2014-01-07 11:48:04 +0000 | [diff] [blame] | 18 | #include "SystemZSubtarget.h" |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 19 | #include "llvm/Target/TargetMachine.h" |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 20 | |
| 21 | namespace llvm { |
| 22 | |
Eric Christopher | 5234995 | 2014-07-01 20:19:02 +0000 | [diff] [blame] | 23 | class TargetFrameLowering; |
| 24 | |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 25 | class SystemZTargetMachine : public LLVMTargetMachine { |
Aditya Nandakumar | a271932 | 2014-11-13 09:26:31 +0000 | [diff] [blame] | 26 | std::unique_ptr<TargetLoweringObjectFile> TLOF; |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 27 | SystemZSubtarget Subtarget; |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 28 | |
| 29 | public: |
Daniel Sanders | 3e5de88 | 2015-06-11 19:41:26 +0000 | [diff] [blame] | 30 | SystemZTargetMachine(const Target &T, const Triple &TT, StringRef CPU, |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 31 | StringRef FS, const TargetOptions &Options, |
| 32 | Reloc::Model RM, CodeModel::Model CM, |
| 33 | CodeGenOpt::Level OL); |
Reid Kleckner | 357600e | 2014-11-20 23:37:18 +0000 | [diff] [blame] | 34 | ~SystemZTargetMachine() override; |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 35 | |
Eric Christopher | 4d0f35a | 2015-03-21 04:22:23 +0000 | [diff] [blame] | 36 | const SystemZSubtarget *getSubtargetImpl() const { return &Subtarget; } |
| 37 | const SystemZSubtarget *getSubtargetImpl(const Function &) const override { |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 38 | return &Subtarget; |
| 39 | } |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 40 | // Override LLVMTargetMachine |
Richard Sandiford | b4d67b5 | 2014-03-06 12:03:36 +0000 | [diff] [blame] | 41 | TargetPassConfig *createPassConfig(PassManagerBase &PM) override; |
Ulrich Weigand | 1f6666a | 2015-03-31 12:52:27 +0000 | [diff] [blame] | 42 | TargetIRAnalysis getTargetIRAnalysis() override; |
Aditya Nandakumar | a271932 | 2014-11-13 09:26:31 +0000 | [diff] [blame] | 43 | TargetLoweringObjectFile *getObjFileLowering() const override { |
| 44 | return TLOF.get(); |
| 45 | } |
Jonas Paulsson | e451eef | 2015-12-10 09:10:07 +0000 | [diff] [blame^] | 46 | |
| 47 | bool targetSchedulesPostRAScheduling() const override { return true; }; |
| 48 | |
Ulrich Weigand | 5f613df | 2013-05-06 16:15:19 +0000 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | } // end namespace llvm |
| 52 | |
| 53 | #endif |