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
|
|
|
|
//
|
2007-12-29 20:36:04 +00:00
|
|
|
// This file 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 "AlphaInstrInfo.h"
|
2006-10-11 04:29:42 +00:00
|
|
|
#include "AlphaISelLowering.h"
|
2011-01-10 12:39:04 +00:00
|
|
|
#include "AlphaFrameLowering.h"
|
2010-05-11 17:31:57 +00:00
|
|
|
#include "AlphaSelectionDAGInfo.h"
|
2005-09-29 22:54:56 +00:00
|
|
|
#include "AlphaSubtarget.h"
|
2010-11-15 00:06:54 +00:00
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
#include "llvm/Target/TargetData.h"
|
2011-01-10 12:39:04 +00:00
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
2005-01-22 23:41:55 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class GlobalValue;
|
|
|
|
|
2006-09-04 04:14:57 +00:00
|
|
|
class AlphaTargetMachine : public LLVMTargetMachine {
|
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;
|
2011-01-10 12:39:04 +00:00
|
|
|
AlphaFrameLowering FrameLowering;
|
2005-09-29 22:54:56 +00:00
|
|
|
AlphaSubtarget Subtarget;
|
2006-10-11 04:29:42 +00:00
|
|
|
AlphaTargetLowering TLInfo;
|
2010-05-11 17:31:57 +00:00
|
|
|
AlphaSelectionDAGInfo TSInfo;
|
2009-06-19 19:36:55 +00:00
|
|
|
|
2005-01-22 23:41:55 +00:00
|
|
|
public:
|
2009-08-02 23:37:13 +00:00
|
|
|
AlphaTargetMachine(const Target &T, const std::string &TT,
|
|
|
|
const std::string &FS);
|
2005-04-21 23:13:11 +00:00
|
|
|
|
|
|
|
virtual const AlphaInstrInfo *getInstrInfo() const { return &InstrInfo; }
|
2011-01-10 12:39:04 +00:00
|
|
|
virtual const TargetFrameLowering *getFrameLowering() const {
|
|
|
|
return &FrameLowering;
|
|
|
|
}
|
2008-05-14 01:58:56 +00:00
|
|
|
virtual const AlphaSubtarget *getSubtargetImpl() const{ return &Subtarget; }
|
|
|
|
virtual const AlphaRegisterInfo *getRegisterInfo() const {
|
2005-01-22 23:41:55 +00:00
|
|
|
return &InstrInfo.getRegisterInfo();
|
|
|
|
}
|
2010-04-17 15:26:15 +00:00
|
|
|
virtual const AlphaTargetLowering* getTargetLowering() const {
|
|
|
|
return &TLInfo;
|
2006-10-11 04:29:42 +00:00
|
|
|
}
|
2010-05-11 17:31:57 +00:00
|
|
|
virtual const AlphaSelectionDAGInfo* getSelectionDAGInfo() const {
|
|
|
|
return &TSInfo;
|
|
|
|
}
|
2006-05-03 01:29:57 +00:00
|
|
|
virtual const TargetData *getTargetData() const { return &DataLayout; }
|
2005-07-22 20:52:16 +00:00
|
|
|
|
2006-09-04 04:14:57 +00:00
|
|
|
// Pass Pipeline Configuration
|
2009-04-29 23:29:43 +00:00
|
|
|
virtual bool addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
|
|
|
|
virtual bool addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
|
2005-01-22 23:41:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|