2005-02-05 04:25:52 +08:00
|
|
|
//===-- AlphaTargetMachine.h - Define TargetMachine for Alpha ---*- C++ -*-===//
|
2005-04-22 07:13:11 +08:00
|
|
|
//
|
2005-01-23 07:41:55 +08: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 07:13:11 +08:00
|
|
|
//
|
2005-01-23 07:41:55 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2005-04-22 07:13:11 +08:00
|
|
|
//
|
2005-01-23 07:41:55 +08:00
|
|
|
// This file declares the Alpha-specific subclass of TargetMachine.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef ALPHA_TARGETMACHINE_H
|
|
|
|
#define ALPHA_TARGETMACHINE_H
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
#include "llvm/Target/TargetFrameInfo.h"
|
|
|
|
#include "llvm/PassManager.h"
|
|
|
|
#include "AlphaInstrInfo.h"
|
2005-07-23 04:52:16 +08:00
|
|
|
#include "AlphaJITInfo.h"
|
2005-01-23 07:41:55 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class GlobalValue;
|
|
|
|
class IntrinsicLowering;
|
|
|
|
|
|
|
|
class AlphaTargetMachine : public TargetMachine {
|
|
|
|
AlphaInstrInfo InstrInfo;
|
|
|
|
TargetFrameInfo FrameInfo;
|
2005-07-23 04:52:16 +08:00
|
|
|
AlphaJITInfo JITInfo;
|
2005-01-23 07:41:55 +08:00
|
|
|
|
|
|
|
public:
|
|
|
|
AlphaTargetMachine(const Module &M, IntrinsicLowering *IL);
|
2005-04-22 07:13:11 +08:00
|
|
|
|
|
|
|
virtual const AlphaInstrInfo *getInstrInfo() const { return &InstrInfo; }
|
2005-01-23 07:41:55 +08:00
|
|
|
virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
|
|
|
|
virtual const MRegisterInfo *getRegisterInfo() const {
|
|
|
|
return &InstrInfo.getRegisterInfo();
|
|
|
|
}
|
2005-07-23 04:52:16 +08:00
|
|
|
virtual TargetJITInfo* getJITInfo() {
|
|
|
|
return &JITInfo;
|
|
|
|
}
|
|
|
|
|
|
|
|
static unsigned getJITMatchQuality();
|
|
|
|
|
|
|
|
/// addPassesToEmitMachineCode - Add passes to the specified pass manager to
|
|
|
|
/// get machine code emitted. This uses a MachineCodeEmitter object to handle
|
|
|
|
/// actually outputting the machine code and resolving things like the address
|
|
|
|
/// of functions. This method should returns true if machine code emission is
|
|
|
|
/// not supported.
|
|
|
|
///
|
|
|
|
virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
|
|
|
|
MachineCodeEmitter &MCE);
|
2005-04-22 07:13:11 +08:00
|
|
|
|
2005-06-25 10:48:37 +08:00
|
|
|
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
|
|
|
CodeGenFileType FileType);
|
2005-02-02 04:35:11 +08:00
|
|
|
|
|
|
|
static unsigned getModuleMatchQuality(const Module &M);
|
2005-01-23 07:41:55 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|