2015-07-18 01:05:36 +00:00
|
|
|
//===- WDC65816TargetMachine.h - Define TargetMachine for WDC65816 -*- C++ -*-===//
|
2014-07-07 03:24:07 +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 Sparc specific subclass of TargetMachine.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef WDC65816TARGETMACHINE_H
|
|
|
|
#define WDC65816TARGETMACHINE_H
|
|
|
|
|
|
|
|
#include "WDC65816FrameLowering.h"
|
|
|
|
#include "WDC65816ISelLowering.h"
|
|
|
|
#include "WDC65816InstrInfo.h"
|
|
|
|
#include "WDC65816SelectionDAGInfo.h"
|
|
|
|
#include "llvm/IR/DataLayout.h"
|
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class WDC65816TargetMachine : public LLVMTargetMachine {
|
2015-07-18 01:05:36 +00:00
|
|
|
// SparcSubtarget Subtarget; WDC_TODO - Do I need this?
|
2014-07-07 03:24:07 +00:00
|
|
|
const DataLayout DL; // Calculates type size & alignment
|
|
|
|
WDC65816InstrInfo InstrInfo;
|
|
|
|
WDC65816TargetLowering TLInfo;
|
|
|
|
WDC65816SelectionDAGInfo TSInfo;
|
|
|
|
WDC65816FrameLowering FrameLowering;
|
|
|
|
public:
|
|
|
|
WDC65816TargetMachine(const Target &T, StringRef TT,
|
|
|
|
StringRef CPU, StringRef FS, const TargetOptions &Options,
|
|
|
|
Reloc::Model RM, CodeModel::Model CM,
|
|
|
|
CodeGenOpt::Level OL);
|
|
|
|
|
|
|
|
virtual const WDC65816InstrInfo *getInstrInfo() const { return &InstrInfo; }
|
|
|
|
virtual const TargetFrameLowering *getFrameLowering() const {
|
|
|
|
return &FrameLowering;
|
|
|
|
}
|
|
|
|
virtual const WDC65816RegisterInfo *getRegisterInfo() const {
|
|
|
|
return &InstrInfo.getRegisterInfo();
|
|
|
|
}
|
|
|
|
virtual const WDC65816TargetLowering* getTargetLowering() const {
|
|
|
|
return &TLInfo;
|
|
|
|
}
|
|
|
|
virtual const WDC65816SelectionDAGInfo* getSelectionDAGInfo() const {
|
|
|
|
return &TSInfo;
|
|
|
|
}
|
|
|
|
virtual const DataLayout *getDataLayout() const { return &DL; }
|
|
|
|
|
2015-07-18 01:05:36 +00:00
|
|
|
#if 0 // WDC_TODO - Do I need this? I think these are both related to JIT
|
2014-07-07 03:24:07 +00:00
|
|
|
// Pass Pipeline Configuration
|
|
|
|
virtual TargetPassConfig *createPassConfig(PassManagerBase &PM);
|
|
|
|
virtual bool addCodeEmitter(PassManagerBase &PM, JITCodeEmitter &JCE);
|
2015-07-18 01:05:36 +00:00
|
|
|
#endif
|
2014-07-07 03:24:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|