2009-08-02 17:32:10 +00:00
|
|
|
//===-- BlackfinTargetMachine.h - TargetMachine for Blackfin ----*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// 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 Blackfin specific subclass of TargetMachine.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef BLACKFINTARGETMACHINE_H
|
|
|
|
#define BLACKFINTARGETMACHINE_H
|
|
|
|
|
|
|
|
#include "BlackfinInstrInfo.h"
|
2010-11-15 00:06:54 +00:00
|
|
|
#include "BlackfinIntrinsicInfo.h"
|
2009-08-02 17:32:10 +00:00
|
|
|
#include "BlackfinISelLowering.h"
|
2011-01-10 12:39:04 +00:00
|
|
|
#include "BlackfinFrameLowering.h"
|
2010-11-15 00:06:54 +00:00
|
|
|
#include "BlackfinSubtarget.h"
|
2010-05-11 17:31:57 +00:00
|
|
|
#include "BlackfinSelectionDAGInfo.h"
|
2010-11-15 00:06:54 +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"
|
2009-08-02 17:32:10 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class BlackfinTargetMachine : public LLVMTargetMachine {
|
|
|
|
const TargetData DataLayout;
|
|
|
|
BlackfinSubtarget Subtarget;
|
|
|
|
BlackfinTargetLowering TLInfo;
|
2010-05-11 17:31:57 +00:00
|
|
|
BlackfinSelectionDAGInfo TSInfo;
|
2009-08-02 17:32:10 +00:00
|
|
|
BlackfinInstrInfo InstrInfo;
|
2011-01-10 12:39:04 +00:00
|
|
|
BlackfinFrameLowering FrameLowering;
|
2009-10-15 18:50:52 +00:00
|
|
|
BlackfinIntrinsicInfo IntrinsicInfo;
|
2009-08-02 17:32:10 +00:00
|
|
|
public:
|
2011-07-19 06:37:02 +00:00
|
|
|
BlackfinTargetMachine(const Target &T, StringRef TT,
|
2011-07-20 07:51:56 +00:00
|
|
|
StringRef CPU, StringRef FS,
|
|
|
|
Reloc::Model RM, CodeModel::Model CM);
|
2009-08-02 17:32:10 +00:00
|
|
|
|
|
|
|
virtual const BlackfinInstrInfo *getInstrInfo() const { return &InstrInfo; }
|
2011-01-10 12:39:04 +00:00
|
|
|
virtual const TargetFrameLowering *getFrameLowering() const {
|
|
|
|
return &FrameLowering;
|
|
|
|
}
|
2009-08-02 17:32:10 +00:00
|
|
|
virtual const BlackfinSubtarget *getSubtargetImpl() const {
|
|
|
|
return &Subtarget;
|
|
|
|
}
|
|
|
|
virtual const BlackfinRegisterInfo *getRegisterInfo() const {
|
|
|
|
return &InstrInfo.getRegisterInfo();
|
|
|
|
}
|
2010-04-17 15:26:15 +00:00
|
|
|
virtual const BlackfinTargetLowering* getTargetLowering() const {
|
|
|
|
return &TLInfo;
|
2009-08-02 17:32:10 +00:00
|
|
|
}
|
2010-05-11 17:31:57 +00:00
|
|
|
virtual const BlackfinSelectionDAGInfo* getSelectionDAGInfo() const {
|
|
|
|
return &TSInfo;
|
|
|
|
}
|
2009-08-02 17:32:10 +00:00
|
|
|
virtual const TargetData *getTargetData() const { return &DataLayout; }
|
|
|
|
virtual bool addInstSelector(PassManagerBase &PM,
|
|
|
|
CodeGenOpt::Level OptLevel);
|
2009-10-15 18:50:52 +00:00
|
|
|
const TargetIntrinsicInfo *getIntrinsicInfo() const {
|
|
|
|
return &IntrinsicInfo;
|
|
|
|
}
|
2009-08-02 17:32:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|