2004-04-25 09:04:49 +02:00
|
|
|
//===-- SparcV9TargetMachine.h - Define TargetMachine for SparcV9 -*- C++ -*-=//
|
2005-04-22 01:30:14 +02:00
|
|
|
//
|
2003-12-17 23:04:00 +01: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-22 01:30:14 +02:00
|
|
|
//
|
2003-12-17 23:04:00 +01:00
|
|
|
//===----------------------------------------------------------------------===//
|
2005-04-22 01:30:14 +02:00
|
|
|
//
|
2004-04-25 09:04:49 +02:00
|
|
|
// This file declares the top-level SparcV9 target machine.
|
2003-12-17 23:04:00 +01:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2004-04-25 09:04:49 +02:00
|
|
|
#ifndef SPARCV9TARGETMACHINE_H
|
|
|
|
#define SPARCV9TARGETMACHINE_H
|
2003-12-17 23:04:00 +01:00
|
|
|
|
|
|
|
#include "llvm/Target/TargetFrameInfo.h"
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
2004-02-25 19:44:15 +01:00
|
|
|
#include "SparcV9InstrInfo.h"
|
|
|
|
#include "SparcV9Internals.h"
|
|
|
|
#include "SparcV9RegInfo.h"
|
|
|
|
#include "SparcV9FrameInfo.h"
|
|
|
|
#include "SparcV9JITInfo.h"
|
2003-12-17 23:04:00 +01:00
|
|
|
|
|
|
|
namespace llvm {
|
2003-12-28 10:46:33 +01:00
|
|
|
class PassManager;
|
2003-12-17 23:04:00 +01:00
|
|
|
|
2004-02-25 19:44:15 +01:00
|
|
|
class SparcV9TargetMachine : public TargetMachine {
|
|
|
|
SparcV9InstrInfo instrInfo;
|
|
|
|
SparcV9SchedInfo schedInfo;
|
|
|
|
SparcV9RegInfo regInfo;
|
|
|
|
SparcV9FrameInfo frameInfo;
|
|
|
|
SparcV9JITInfo jitInfo;
|
2003-12-17 23:04:00 +01:00
|
|
|
public:
|
2005-09-01 23:38:21 +02:00
|
|
|
SparcV9TargetMachine(const Module &M, IntrinsicLowering *IL,
|
|
|
|
const std::string &FS);
|
2005-04-22 01:30:14 +02:00
|
|
|
|
2004-06-02 07:55:25 +02:00
|
|
|
virtual const TargetInstrInfo *getInstrInfo() const { return &instrInfo; }
|
|
|
|
virtual const TargetSchedInfo *getSchedInfo() const { return &schedInfo; }
|
2004-06-03 04:45:09 +02:00
|
|
|
virtual const SparcV9RegInfo *getRegInfo() const { return ®Info; }
|
2004-06-02 07:55:25 +02:00
|
|
|
virtual const TargetFrameInfo *getFrameInfo() const { return &frameInfo; }
|
2003-12-20 02:22:19 +01:00
|
|
|
virtual TargetJITInfo *getJITInfo() { return &jitInfo; }
|
2004-04-25 08:32:28 +02:00
|
|
|
virtual const MRegisterInfo *getRegisterInfo() const {
|
|
|
|
return &instrInfo.getRegisterInfo();
|
|
|
|
}
|
2003-12-17 23:04:00 +01:00
|
|
|
|
2005-06-25 04:48:37 +02:00
|
|
|
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
|
|
|
CodeGenFileType FileType);
|
2003-12-17 23:04:00 +01:00
|
|
|
virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
|
|
|
|
MachineCodeEmitter &MCE);
|
2004-07-11 04:48:49 +02:00
|
|
|
|
|
|
|
static unsigned getModuleMatchQuality(const Module &M);
|
|
|
|
static unsigned getJITMatchQuality();
|
2003-12-17 23:04:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|