2012-02-18 12:03:15 +00:00
|
|
|
//===-- MBlazeTargetMachine.h - Define TargetMachine for MBlaze -*- C++ -*-===//
|
2010-02-23 19:15:24 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file declares the MBlaze specific subclass of TargetMachine.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef MBLAZE_TARGETMACHINE_H
|
|
|
|
#define MBLAZE_TARGETMACHINE_H
|
|
|
|
|
|
|
|
#include "MBlazeSubtarget.h"
|
|
|
|
#include "MBlazeInstrInfo.h"
|
|
|
|
#include "MBlazeISelLowering.h"
|
2010-05-11 17:31:57 +00:00
|
|
|
#include "MBlazeSelectionDAGInfo.h"
|
2010-02-23 19:15:24 +00:00
|
|
|
#include "MBlazeIntrinsicInfo.h"
|
2011-01-10 12:39:04 +00:00
|
|
|
#include "MBlazeFrameLowering.h"
|
2010-10-21 03:57:26 +00:00
|
|
|
#include "MBlazeELFWriterInfo.h"
|
|
|
|
#include "llvm/MC/MCStreamer.h"
|
2010-02-23 19:15:24 +00:00
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
#include "llvm/Target/TargetData.h"
|
2011-01-10 12:39:04 +00:00
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
2010-02-23 19:15:24 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class formatted_raw_ostream;
|
|
|
|
|
|
|
|
class MBlazeTargetMachine : public LLVMTargetMachine {
|
2011-01-10 12:39:04 +00:00
|
|
|
MBlazeSubtarget Subtarget;
|
|
|
|
const TargetData DataLayout; // Calculates type size & alignment
|
|
|
|
MBlazeInstrInfo InstrInfo;
|
|
|
|
MBlazeFrameLowering FrameLowering;
|
|
|
|
MBlazeTargetLowering TLInfo;
|
2010-05-11 17:31:57 +00:00
|
|
|
MBlazeSelectionDAGInfo TSInfo;
|
2011-01-10 12:39:04 +00:00
|
|
|
MBlazeIntrinsicInfo IntrinsicInfo;
|
2010-10-21 03:57:26 +00:00
|
|
|
MBlazeELFWriterInfo ELFWriterInfo;
|
2011-04-11 22:31:52 +00:00
|
|
|
InstrItineraryData InstrItins;
|
|
|
|
|
2010-02-23 19:15:24 +00:00
|
|
|
public:
|
2011-07-19 06:37:02 +00:00
|
|
|
MBlazeTargetMachine(const Target &T, StringRef TT,
|
2011-07-20 07:51:56 +00:00
|
|
|
StringRef CPU, StringRef FS,
|
2011-12-02 22:16:29 +00:00
|
|
|
const TargetOptions &Options,
|
2011-11-16 08:38:26 +00:00
|
|
|
Reloc::Model RM, CodeModel::Model CM,
|
|
|
|
CodeGenOpt::Level OL);
|
2010-02-23 19:15:24 +00:00
|
|
|
|
|
|
|
virtual const MBlazeInstrInfo *getInstrInfo() const
|
|
|
|
{ return &InstrInfo; }
|
|
|
|
|
2011-04-11 22:31:52 +00:00
|
|
|
virtual const InstrItineraryData *getInstrItineraryData() const
|
|
|
|
{ return &InstrItins; }
|
|
|
|
|
2011-01-10 12:39:04 +00:00
|
|
|
virtual const TargetFrameLowering *getFrameLowering() const
|
|
|
|
{ return &FrameLowering; }
|
2010-02-23 19:15:24 +00:00
|
|
|
|
|
|
|
virtual const MBlazeSubtarget *getSubtargetImpl() const
|
|
|
|
{ return &Subtarget; }
|
|
|
|
|
|
|
|
virtual const TargetData *getTargetData() const
|
|
|
|
{ return &DataLayout;}
|
|
|
|
|
|
|
|
virtual const MBlazeRegisterInfo *getRegisterInfo() const
|
|
|
|
{ return &InstrInfo.getRegisterInfo(); }
|
|
|
|
|
2010-04-17 15:26:15 +00:00
|
|
|
virtual const MBlazeTargetLowering *getTargetLowering() const
|
|
|
|
{ return &TLInfo; }
|
2010-02-23 19:15:24 +00:00
|
|
|
|
2010-05-11 17:31:57 +00:00
|
|
|
virtual const MBlazeSelectionDAGInfo* getSelectionDAGInfo() const
|
|
|
|
{ return &TSInfo; }
|
|
|
|
|
2010-02-23 19:15:24 +00:00
|
|
|
const TargetIntrinsicInfo *getIntrinsicInfo() const
|
|
|
|
{ return &IntrinsicInfo; }
|
|
|
|
|
2010-10-21 03:57:26 +00:00
|
|
|
virtual const MBlazeELFWriterInfo *getELFWriterInfo() const {
|
|
|
|
return &ELFWriterInfo;
|
|
|
|
}
|
|
|
|
|
2010-02-23 19:15:24 +00:00
|
|
|
// Pass Pipeline Configuration
|
2012-02-04 02:56:59 +00:00
|
|
|
virtual TargetPassConfig *createPassConfig(PassManagerBase &PM);
|
2010-02-23 19:15:24 +00:00
|
|
|
};
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|