2005-03-18 02:17:03 +08:00
|
|
|
//===- IA64RegisterInfo.h - IA64 Register Information Impl ------*- C++ -*-===//
|
2005-04-22 07:13:11 +08:00
|
|
|
//
|
2005-03-18 02:17:03 +08:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by Duraid Madina 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-03-18 02:17:03 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file contains the IA64 implementation of the MRegisterInfo class.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef IA64REGISTERINFO_H
|
|
|
|
#define IA64REGISTERINFO_H
|
|
|
|
|
|
|
|
#include "llvm/Target/MRegisterInfo.h"
|
|
|
|
#include "IA64GenRegisterInfo.h.inc"
|
|
|
|
|
|
|
|
namespace llvm { class llvm::Type; }
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2006-11-28 07:37:22 +08:00
|
|
|
class TargetInstrInfo;
|
|
|
|
|
2005-03-18 02:17:03 +08:00
|
|
|
struct IA64RegisterInfo : public IA64GenRegisterInfo {
|
2006-11-28 07:37:22 +08:00
|
|
|
const TargetInstrInfo &TII;
|
|
|
|
|
|
|
|
IA64RegisterInfo(const TargetInstrInfo &tii);
|
2005-03-18 02:17:03 +08:00
|
|
|
|
|
|
|
/// Code Generation virtual methods...
|
|
|
|
void storeRegToStackSlot(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI,
|
2005-09-30 09:30:55 +08:00
|
|
|
unsigned SrcReg, int FrameIndex,
|
|
|
|
const TargetRegisterClass *RC) const;
|
2005-03-18 02:17:03 +08:00
|
|
|
|
2007-10-05 09:33:45 +08:00
|
|
|
void storeRegToAddr(MachineFunction &MF, unsigned SrcReg,
|
2007-10-19 06:40:57 +08:00
|
|
|
SmallVectorImpl<MachineOperand> &Addr,
|
2007-10-05 09:33:45 +08:00
|
|
|
const TargetRegisterClass *RC,
|
2007-10-19 05:29:24 +08:00
|
|
|
SmallVectorImpl<MachineInstr*> &NewMIs) const;
|
2007-10-05 09:33:45 +08:00
|
|
|
|
2005-03-18 02:17:03 +08:00
|
|
|
void loadRegFromStackSlot(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI,
|
2005-09-30 09:30:55 +08:00
|
|
|
unsigned DestReg, int FrameIndex,
|
|
|
|
const TargetRegisterClass *RC) const;
|
2005-04-22 07:13:11 +08:00
|
|
|
|
2007-10-05 09:33:45 +08:00
|
|
|
void loadRegFromAddr(MachineFunction &MF, unsigned DestReg,
|
2007-10-19 06:40:57 +08:00
|
|
|
SmallVectorImpl<MachineOperand> &Addr,
|
2007-10-05 09:33:45 +08:00
|
|
|
const TargetRegisterClass *RC,
|
2007-10-19 05:29:24 +08:00
|
|
|
SmallVectorImpl<MachineInstr*> &NewMIs) const;
|
2007-10-05 09:33:45 +08:00
|
|
|
|
2005-03-18 02:17:03 +08:00
|
|
|
void copyRegToReg(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI,
|
|
|
|
unsigned DestReg, unsigned SrcReg,
|
2007-09-26 14:25:56 +08:00
|
|
|
const TargetRegisterClass *DestRC,
|
|
|
|
const TargetRegisterClass *SrcRC) const;
|
2005-03-18 02:17:03 +08:00
|
|
|
|
2007-03-20 16:09:38 +08:00
|
|
|
void reMaterialize(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI,
|
|
|
|
unsigned DestReg, const MachineInstr *Orig) const;
|
|
|
|
|
2007-07-14 22:06:15 +08:00
|
|
|
const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
2006-05-18 08:12:58 +08:00
|
|
|
|
2007-07-14 22:06:15 +08:00
|
|
|
const TargetRegisterClass* const* getCalleeSavedRegClasses(
|
|
|
|
const MachineFunction *MF = 0) const;
|
2006-05-18 08:12:58 +08:00
|
|
|
|
2007-02-20 05:49:54 +08:00
|
|
|
BitVector getReservedRegs(const MachineFunction &MF) const;
|
|
|
|
|
2007-01-23 08:57:47 +08:00
|
|
|
bool hasFP(const MachineFunction &MF) const;
|
|
|
|
|
2005-03-18 02:17:03 +08:00
|
|
|
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
|
|
|
MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI) const;
|
|
|
|
|
2007-02-28 08:21:17 +08:00
|
|
|
void eliminateFrameIndex(MachineBasicBlock::iterator MI,
|
2007-05-01 17:13:03 +08:00
|
|
|
int SPAdj, RegScavenger *RS = NULL) const;
|
2005-03-18 02:17:03 +08:00
|
|
|
|
|
|
|
void emitPrologue(MachineFunction &MF) const;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
2006-03-24 02:12:57 +08:00
|
|
|
|
2006-03-28 21:48:33 +08:00
|
|
|
// Debug information queries.
|
2006-04-08 00:34:46 +08:00
|
|
|
unsigned getRARegister() const;
|
2006-03-28 21:48:33 +08:00
|
|
|
unsigned getFrameRegister(MachineFunction &MF) const;
|
2007-02-22 06:54:50 +08:00
|
|
|
|
|
|
|
// Exception handling queries.
|
|
|
|
unsigned getEHExceptionRegister() const;
|
|
|
|
unsigned getEHHandlerRegister() const;
|
2005-03-18 02:17:03 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|