1 //===-- ZPUTargetMachine.h - Define TargetMachine for ZPU -00--*- 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 ZPU specific subclass of TargetMachine.
12 //===----------------------------------------------------------------------===//
14 #ifndef ZPUTARGETMACHINE_H
15 #define ZPUTARGETMACHINE_H
17 #include "ZPUInstrInfo.h"
18 #include "ZPUISelLowering.h"
19 #include "llvm/Target/TargetMachine.h"
20 #include "llvm/Target/TargetData.h"
21 #include "llvm/Target/TargetFrameInfo.h"
24 class formatted_raw_ostream
;
26 class ZPUTargetMachine
: public LLVMTargetMachine
{
27 const TargetData DataLayout
; // Calculates type size & alignment
28 ZPUInstrInfo InstrInfo
;
29 TargetFrameInfo FrameInfo
;
30 ZPUTargetLowering TLInfo
;
33 ZPUTargetMachine(const Target
&T
, const std::string
&TT
, const std::string
&FS
,
36 virtual const ZPUInstrInfo
*getInstrInfo() const
37 { return &InstrInfo
; }
38 virtual const TargetFrameInfo
*getFrameInfo() const
39 { return &FrameInfo
; }
40 virtual const TargetData
*getTargetData() const
41 { return &DataLayout
;}
43 virtual const ZPURegisterInfo
*getRegisterInfo() const {
44 return &InstrInfo
.getRegisterInfo();
46 virtual const ZPUTargetLowering
*getTargetLowering() const {
49 virtual bool addInstSelector(PassManagerBase
&PM
,
50 CodeGenOpt::Level OptLevel
);
54 } // End llvm namespace