2006-02-05 05:50:24 +00:00
|
|
|
//===-- SparcTargetMachine.h - Define TargetMachine for Sparc ---*- C++ -*-===//
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2004-02-25 19:28:19 +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
|
|
|
//
|
2004-02-25 19:28:19 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2006-02-05 05:50:24 +00:00
|
|
|
// This file declares the Sparc specific subclass of TargetMachine.
|
2004-02-25 19:28:19 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2006-02-05 05:50:24 +00:00
|
|
|
#ifndef SPARCTARGETMACHINE_H
|
|
|
|
#define SPARCTARGETMACHINE_H
|
2004-02-25 19:28:19 +00:00
|
|
|
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
#include "llvm/Target/TargetFrameInfo.h"
|
|
|
|
#include "llvm/PassManager.h"
|
2006-02-05 05:50:24 +00:00
|
|
|
#include "SparcInstrInfo.h"
|
|
|
|
#include "SparcSubtarget.h"
|
2004-02-25 19:28:19 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class IntrinsicLowering;
|
2004-10-09 05:57:01 +00:00
|
|
|
class Module;
|
2004-02-25 19:28:19 +00:00
|
|
|
|
2006-02-05 05:50:24 +00:00
|
|
|
class SparcTargetMachine : public TargetMachine {
|
|
|
|
SparcSubtarget Subtarget;
|
|
|
|
SparcInstrInfo InstrInfo;
|
2004-02-25 19:28:19 +00:00
|
|
|
TargetFrameInfo FrameInfo;
|
|
|
|
public:
|
2006-02-05 05:50:24 +00:00
|
|
|
SparcTargetMachine(const Module &M, IntrinsicLowering *IL,
|
|
|
|
const std::string &FS);
|
2004-02-25 19:28:19 +00:00
|
|
|
|
2006-02-05 05:50:24 +00:00
|
|
|
virtual const SparcInstrInfo *getInstrInfo() const { return &InstrInfo; }
|
2004-06-02 05:47:26 +00:00
|
|
|
virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
|
2006-01-26 06:51:21 +00:00
|
|
|
virtual const TargetSubtarget *getSubtargetImpl() const{ return &Subtarget; }
|
2004-02-25 19:28:19 +00:00
|
|
|
virtual const MRegisterInfo *getRegisterInfo() const {
|
|
|
|
return &InstrInfo.getRegisterInfo();
|
|
|
|
}
|
|
|
|
|
2004-10-09 05:57:01 +00:00
|
|
|
static unsigned getModuleMatchQuality(const Module &M);
|
2005-04-21 23:30:14 +00:00
|
|
|
|
2005-06-25 02:48:37 +00:00
|
|
|
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
2005-11-08 02:11:51 +00:00
|
|
|
CodeGenFileType FileType, bool Fast);
|
2004-02-25 19:28:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|