remove a dead bool.
[llvm/avr.git] / lib / Target / CellSPU / SPUTargetMachine.h
blob9fdcfe9ab619b9f2de85aef5852281f4a32dfb62
1 //===-- SPUTargetMachine.h - Define TargetMachine for Cell SPU ----*- 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 CellSPU-specific subclass of TargetMachine.
12 //===----------------------------------------------------------------------===//
14 #ifndef SPU_TARGETMACHINE_H
15 #define SPU_TARGETMACHINE_H
17 #include "SPUSubtarget.h"
18 #include "SPUInstrInfo.h"
19 #include "SPUISelLowering.h"
20 #include "SPUFrameInfo.h"
21 #include "llvm/Target/TargetMachine.h"
22 #include "llvm/Target/TargetData.h"
24 namespace llvm {
25 class PassManager;
26 class GlobalValue;
27 class TargetFrameInfo;
29 /// SPUTargetMachine
30 ///
31 class SPUTargetMachine : public LLVMTargetMachine {
32 SPUSubtarget Subtarget;
33 const TargetData DataLayout;
34 SPUInstrInfo InstrInfo;
35 SPUFrameInfo FrameInfo;
36 SPUTargetLowering TLInfo;
37 InstrItineraryData InstrItins;
38 public:
39 SPUTargetMachine(const Target &T, const std::string &TT,
40 const std::string &FS);
42 /// Return the subtarget implementation object
43 virtual const SPUSubtarget *getSubtargetImpl() const {
44 return &Subtarget;
46 virtual const SPUInstrInfo *getInstrInfo() const {
47 return &InstrInfo;
49 virtual const SPUFrameInfo *getFrameInfo() const {
50 return &FrameInfo;
52 /*!
53 \note Cell SPU does not support JIT today. It could support JIT at some
54 point.
56 virtual TargetJITInfo *getJITInfo() {
57 return NULL;
60 virtual SPUTargetLowering *getTargetLowering() const {
61 return const_cast<SPUTargetLowering*>(&TLInfo);
64 virtual const SPURegisterInfo *getRegisterInfo() const {
65 return &InstrInfo.getRegisterInfo();
68 virtual const TargetData *getTargetData() const {
69 return &DataLayout;
72 virtual const InstrItineraryData getInstrItineraryData() const {
73 return InstrItins;
76 // Pass Pipeline Configuration
77 virtual bool addInstSelector(PassManagerBase &PM,
78 CodeGenOpt::Level OptLevel);
81 } // end namespace llvm
83 #endif