2004-04-25 07:04:49 +00:00
|
|
|
//===-- SparcV9TargetMachine.h - Define TargetMachine for SparcV9 -*- C++ -*-=//
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2003-12-17 22:04:00 +00:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2003-12-17 22:04:00 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2004-04-25 07:04:49 +00:00
|
|
|
// This file declares the top-level SparcV9 target machine.
|
2003-12-17 22:04:00 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2004-04-25 07:04:49 +00:00
|
|
|
#ifndef SPARCV9TARGETMACHINE_H
|
|
|
|
#define SPARCV9TARGETMACHINE_H
|
2003-12-17 22:04:00 +00:00
|
|
|
|
|
|
|
#include "llvm/Target/TargetFrameInfo.h"
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
2004-02-25 18:44:15 +00:00
|
|
|
#include "SparcV9InstrInfo.h"
|
|
|
|
#include "SparcV9Internals.h"
|
|
|
|
#include "SparcV9RegInfo.h"
|
|
|
|
#include "SparcV9FrameInfo.h"
|
|
|
|
#include "SparcV9JITInfo.h"
|
2003-12-17 22:04:00 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
2003-12-28 09:46:33 +00:00
|
|
|
class PassManager;
|
2003-12-17 22:04:00 +00:00
|
|
|
|
2004-02-25 18:44:15 +00:00
|
|
|
class SparcV9TargetMachine : public TargetMachine {
|
|
|
|
SparcV9InstrInfo instrInfo;
|
|
|
|
SparcV9SchedInfo schedInfo;
|
|
|
|
SparcV9RegInfo regInfo;
|
|
|
|
SparcV9FrameInfo frameInfo;
|
|
|
|
SparcV9JITInfo jitInfo;
|
2003-12-17 22:04:00 +00:00
|
|
|
public:
|
2004-07-11 02:48:49 +00:00
|
|
|
SparcV9TargetMachine(const Module &M, IntrinsicLowering *IL);
|
2005-04-21 23:30:14 +00:00
|
|
|
|
2004-06-02 05:55:25 +00:00
|
|
|
virtual const TargetInstrInfo *getInstrInfo() const { return &instrInfo; }
|
|
|
|
virtual const TargetSchedInfo *getSchedInfo() const { return &schedInfo; }
|
2004-06-03 02:45:09 +00:00
|
|
|
virtual const SparcV9RegInfo *getRegInfo() const { return ®Info; }
|
2004-06-02 05:55:25 +00:00
|
|
|
virtual const TargetFrameInfo *getFrameInfo() const { return &frameInfo; }
|
2003-12-20 01:22:19 +00:00
|
|
|
virtual TargetJITInfo *getJITInfo() { return &jitInfo; }
|
2004-04-25 06:32:28 +00:00
|
|
|
virtual const MRegisterInfo *getRegisterInfo() const {
|
|
|
|
return &instrInfo.getRegisterInfo();
|
|
|
|
}
|
2003-12-17 22:04:00 +00:00
|
|
|
|
2005-06-25 02:48:37 +00:00
|
|
|
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
|
|
|
CodeGenFileType FileType);
|
2003-12-17 22:04:00 +00:00
|
|
|
virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
|
|
|
|
MachineCodeEmitter &MCE);
|
2004-07-11 02:48:49 +00:00
|
|
|
|
|
|
|
static unsigned getModuleMatchQuality(const Module &M);
|
|
|
|
static unsigned getJITMatchQuality();
|
2003-12-17 22:04:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|