2006-02-05 06:50:24 +01:00
|
|
|
//===-- SparcTargetMachine.h - Define TargetMachine for Sparc ---*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 21:36:04 +01:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2006-02-05 06:50:24 +01:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file declares the Sparc specific subclass of TargetMachine.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef SPARCTARGETMACHINE_H
|
|
|
|
#define SPARCTARGETMACHINE_H
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
2006-05-12 08:33:49 +02:00
|
|
|
#include "llvm/Target/TargetData.h"
|
2006-02-05 06:50:24 +01:00
|
|
|
#include "llvm/Target/TargetFrameInfo.h"
|
|
|
|
#include "SparcInstrInfo.h"
|
|
|
|
#include "SparcSubtarget.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class Module;
|
|
|
|
|
2006-09-04 06:14:57 +02:00
|
|
|
class SparcTargetMachine : public LLVMTargetMachine {
|
2006-05-03 03:29:57 +02:00
|
|
|
const TargetData DataLayout; // Calculates type size & alignment
|
2006-02-05 06:50:24 +01:00
|
|
|
SparcSubtarget Subtarget;
|
|
|
|
SparcInstrInfo InstrInfo;
|
|
|
|
TargetFrameInfo FrameInfo;
|
2006-09-08 01:39:26 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual const TargetAsmInfo *createTargetAsmInfo() const;
|
|
|
|
|
2006-02-05 06:50:24 +01:00
|
|
|
public:
|
2006-03-23 06:43:16 +01:00
|
|
|
SparcTargetMachine(const Module &M, const std::string &FS);
|
2006-02-05 06:50:24 +01:00
|
|
|
|
|
|
|
virtual const SparcInstrInfo *getInstrInfo() const { return &InstrInfo; }
|
|
|
|
virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
|
2008-05-14 03:58:56 +02:00
|
|
|
virtual const SparcSubtarget *getSubtargetImpl() const{ return &Subtarget; }
|
|
|
|
virtual const SparcRegisterInfo *getRegisterInfo() const {
|
2006-02-05 06:50:24 +01:00
|
|
|
return &InstrInfo.getRegisterInfo();
|
|
|
|
}
|
2006-05-03 03:29:57 +02:00
|
|
|
virtual const TargetData *getTargetData() const { return &DataLayout; }
|
2006-02-05 06:50:24 +01:00
|
|
|
static unsigned getModuleMatchQuality(const Module &M);
|
|
|
|
|
2006-09-04 06:14:57 +02:00
|
|
|
// Pass Pipeline Configuration
|
2008-03-11 23:29:46 +01:00
|
|
|
virtual bool addInstSelector(PassManagerBase &PM, bool Fast);
|
|
|
|
virtual bool addPreEmitPass(PassManagerBase &PM, bool Fast);
|
|
|
|
virtual bool addAssemblyEmitter(PassManagerBase &PM, bool Fast,
|
2006-09-04 06:14:57 +02:00
|
|
|
std::ostream &Out);
|
2006-02-05 06:50:24 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|