2005-02-04 21:25:52 +01:00
|
|
|
//===-- AlphaTargetMachine.h - Define TargetMachine for Alpha ---*- C++ -*-===//
|
2005-04-22 01:13:11 +02:00
|
|
|
//
|
2005-01-23 00:41:55 +01:00
|
|
|
// 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.
|
2005-04-22 01:13:11 +02:00
|
|
|
//
|
2005-01-23 00:41:55 +01:00
|
|
|
//===----------------------------------------------------------------------===//
|
2005-04-22 01:13:11 +02:00
|
|
|
//
|
2005-01-23 00:41:55 +01: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 08:33:49 +02:00
|
|
|
#include "llvm/Target/TargetData.h"
|
2005-01-23 00:41:55 +01:00
|
|
|
#include "llvm/Target/TargetFrameInfo.h"
|
|
|
|
#include "AlphaInstrInfo.h"
|
2005-07-22 22:52:16 +02:00
|
|
|
#include "AlphaJITInfo.h"
|
2006-10-11 06:29:42 +02:00
|
|
|
#include "AlphaISelLowering.h"
|
2005-09-30 00:54:56 +02:00
|
|
|
#include "AlphaSubtarget.h"
|
2005-01-23 00:41:55 +01:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class GlobalValue;
|
|
|
|
|
2006-09-04 06:14:57 +02:00
|
|
|
class AlphaTargetMachine : public LLVMTargetMachine {
|
2006-05-03 03:29:57 +02:00
|
|
|
const TargetData DataLayout; // Calculates type size & alignment
|
2005-01-23 00:41:55 +01:00
|
|
|
AlphaInstrInfo InstrInfo;
|
|
|
|
TargetFrameInfo FrameInfo;
|
2005-07-22 22:52:16 +02:00
|
|
|
AlphaJITInfo JITInfo;
|
2005-09-30 00:54:56 +02:00
|
|
|
AlphaSubtarget Subtarget;
|
2006-10-11 06:29:42 +02:00
|
|
|
AlphaTargetLowering TLInfo;
|
2009-06-19 21:36:55 +02:00
|
|
|
|
2006-09-08 01:39:26 +02:00
|
|
|
protected:
|
|
|
|
virtual const TargetAsmInfo *createTargetAsmInfo() const;
|
2009-06-19 21:36:55 +02:00
|
|
|
|
2005-01-23 00:41:55 +01:00
|
|
|
public:
|
2009-08-03 01:37:13 +02:00
|
|
|
AlphaTargetMachine(const Target &T, const std::string &TT,
|
|
|
|
const std::string &FS);
|
2005-04-22 01:13:11 +02:00
|
|
|
|
|
|
|
virtual const AlphaInstrInfo *getInstrInfo() const { return &InstrInfo; }
|
2005-01-23 00:41:55 +01:00
|
|
|
virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
|
2008-05-14 03:58:56 +02:00
|
|
|
virtual const AlphaSubtarget *getSubtargetImpl() const{ return &Subtarget; }
|
|
|
|
virtual const AlphaRegisterInfo *getRegisterInfo() const {
|
2005-01-23 00:41:55 +01:00
|
|
|
return &InstrInfo.getRegisterInfo();
|
|
|
|
}
|
2009-06-19 21:36:55 +02:00
|
|
|
virtual AlphaTargetLowering* getTargetLowering() const {
|
2006-10-11 06:29:42 +02:00
|
|
|
return const_cast<AlphaTargetLowering*>(&TLInfo);
|
|
|
|
}
|
2006-05-03 03:29:57 +02:00
|
|
|
virtual const TargetData *getTargetData() const { return &DataLayout; }
|
2008-05-14 03:58:56 +02:00
|
|
|
virtual AlphaJITInfo* getJITInfo() {
|
2005-07-22 22:52:16 +02:00
|
|
|
return &JITInfo;
|
|
|
|
}
|
|
|
|
|
2006-09-04 06:14:57 +02:00
|
|
|
// Pass Pipeline Configuration
|
2009-04-30 01:29:43 +02:00
|
|
|
virtual bool addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
|
|
|
|
virtual bool addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
|
|
|
|
virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel,
|
2009-07-16 00:33:19 +02:00
|
|
|
MachineCodeEmitter &MCE);
|
2009-05-30 22:51:52 +02:00
|
|
|
virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel,
|
2009-07-16 00:33:19 +02:00
|
|
|
JITCodeEmitter &JCE);
|
2009-07-06 07:09:34 +02:00
|
|
|
virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel,
|
2009-07-16 00:33:19 +02:00
|
|
|
ObjectCodeEmitter &JCE);
|
2009-04-30 01:29:43 +02:00
|
|
|
virtual bool addSimpleCodeEmitter(PassManagerBase &PM,
|
|
|
|
CodeGenOpt::Level OptLevel,
|
|
|
|
MachineCodeEmitter &MCE);
|
2009-05-30 22:51:52 +02:00
|
|
|
virtual bool addSimpleCodeEmitter(PassManagerBase &PM,
|
|
|
|
CodeGenOpt::Level OptLevel,
|
|
|
|
JITCodeEmitter &JCE);
|
2009-07-06 07:09:34 +02:00
|
|
|
virtual bool addSimpleCodeEmitter(PassManagerBase &PM,
|
|
|
|
CodeGenOpt::Level OptLevel,
|
|
|
|
ObjectCodeEmitter &OCE);
|
2005-01-23 00:41:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|