zpu: first sign of being able to build a .S file
[llvm/zpu.git] / lib / Target / ZPU / ZPUTargetMachine.h
bloba8abe6b616a9697508690d1aca29b48ab938d998
1 //===-- ZPUTargetMachine.h - Define TargetMachine for ZPU -00--*- 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 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"
23 namespace llvm {
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;
31 public:
33 ZPUTargetMachine(const Target &T, const std::string &TT, const std::string &FS,
34 bool isLittle=false);
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 {
47 return &TLInfo;
49 virtual bool addInstSelector(PassManagerBase &PM,
50 CodeGenOpt::Level OptLevel);
54 } // End llvm namespace
56 #endif