2005-02-04 20:25:52 +00:00
|
|
|
//===-- AlphaTargetMachine.h - Define TargetMachine for Alpha ---*- C++ -*-===//
|
2005-04-21 23:13:11 +00:00
|
|
|
//
|
2005-01-22 23:41:55 +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:13:11 +00:00
|
|
|
//
|
2005-01-22 23:41:55 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2005-04-21 23:13:11 +00:00
|
|
|
//
|
2005-01-22 23:41:55 +00:00
|
|
|
// This file declares the Alpha-specific subclass of TargetMachine.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef ALPHA_TARGETMACHINE_H
|
|
|
|
#define ALPHA_TARGETMACHINE_H
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
2006-05-12 06:33:49 +00:00
|
|
|
#include "llvm/Target/TargetData.h"
|
2005-01-22 23:41:55 +00:00
|
|
|
#include "llvm/Target/TargetFrameInfo.h"
|
|
|
|
#include "llvm/PassManager.h"
|
|
|
|
#include "AlphaInstrInfo.h"
|
2005-07-22 20:52:16 +00:00
|
|
|
#include "AlphaJITInfo.h"
|
2005-09-29 22:54:56 +00:00
|
|
|
#include "AlphaSubtarget.h"
|
2005-01-22 23:41:55 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class GlobalValue;
|
|
|
|
|
|
|
|
class AlphaTargetMachine : public TargetMachine {
|
2006-05-03 01:29:57 +00:00
|
|
|
const TargetData DataLayout; // Calculates type size & alignment
|
2005-01-22 23:41:55 +00:00
|
|
|
AlphaInstrInfo InstrInfo;
|
|
|
|
TargetFrameInfo FrameInfo;
|
2005-07-22 20:52:16 +00:00
|
|
|
AlphaJITInfo JITInfo;
|
2005-09-29 22:54:56 +00:00
|
|
|
AlphaSubtarget Subtarget;
|
2006-05-03 01:29:57 +00:00
|
|
|
|
2005-01-22 23:41:55 +00:00
|
|
|
public:
|
2006-03-23 05:43:16 +00:00
|
|
|
AlphaTargetMachine(const Module &M, const std::string &FS);
|
2005-04-21 23:13:11 +00:00
|
|
|
|
|
|
|
virtual const AlphaInstrInfo *getInstrInfo() const { return &InstrInfo; }
|
2005-01-22 23:41:55 +00:00
|
|
|
virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
|
2005-09-29 22:54:56 +00:00
|
|
|
virtual const TargetSubtarget *getSubtargetImpl() const{ return &Subtarget; }
|
2005-01-22 23:41:55 +00:00
|
|
|
virtual const MRegisterInfo *getRegisterInfo() const {
|
|
|
|
return &InstrInfo.getRegisterInfo();
|
|
|
|
}
|
2006-05-03 01:29:57 +00:00
|
|
|
virtual const TargetData *getTargetData() const { return &DataLayout; }
|
2005-07-22 20:52:16 +00:00
|
|
|
virtual TargetJITInfo* getJITInfo() {
|
|
|
|
return &JITInfo;
|
|
|
|
}
|
|
|
|
|
|
|
|
static unsigned getJITMatchQuality();
|
|
|
|
|
|
|
|
virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
|
|
|
|
MachineCodeEmitter &MCE);
|
2005-04-21 23:13:11 +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);
|
2005-02-01 20:35:11 +00:00
|
|
|
|
|
|
|
static unsigned getModuleMatchQuality(const Module &M);
|
2005-01-22 23:41:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|