2010-05-24 17:43:01 +00:00
|
|
|
//===-- SystemZRegisterInfo.h - SystemZ Register Information ----*- C++ -*-===//
|
2009-07-16 13:27:25 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file contains the SystemZ implementation of the TargetRegisterInfo class.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef SystemZREGISTERINFO_H
|
|
|
|
#define SystemZREGISTERINFO_H
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetRegisterInfo.h"
|
|
|
|
#include "SystemZGenRegisterInfo.h.inc"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class SystemZSubtarget;
|
2009-07-16 14:09:56 +00:00
|
|
|
class SystemZInstrInfo;
|
2009-07-16 13:27:25 +00:00
|
|
|
class Type;
|
|
|
|
|
|
|
|
struct SystemZRegisterInfo : public SystemZGenRegisterInfo {
|
|
|
|
SystemZTargetMachine &TM;
|
2009-07-16 14:09:56 +00:00
|
|
|
const SystemZInstrInfo &TII;
|
2009-07-16 13:27:25 +00:00
|
|
|
|
2009-07-16 14:09:56 +00:00
|
|
|
SystemZRegisterInfo(SystemZTargetMachine &tm, const SystemZInstrInfo &tii);
|
2009-07-16 13:27:25 +00:00
|
|
|
|
|
|
|
/// Code Generation virtual methods...
|
|
|
|
const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
|
|
|
|
|
|
|
BitVector getReservedRegs(const MachineFunction &MF) const;
|
|
|
|
|
2010-07-20 06:52:21 +00:00
|
|
|
bool hasReservedCallFrame(const MachineFunction &MF) const { return true; }
|
2009-07-16 13:27:25 +00:00
|
|
|
bool hasFP(const MachineFunction &MF) const;
|
|
|
|
|
2010-01-26 23:15:09 +00:00
|
|
|
int getFrameIndexOffset(const MachineFunction &MF, int FI) const;
|
2009-07-16 13:49:25 +00:00
|
|
|
|
2009-07-16 13:27:25 +00:00
|
|
|
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
|
|
|
MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator I) const;
|
|
|
|
|
2010-08-26 23:32:16 +00:00
|
|
|
void eliminateFrameIndex(MachineBasicBlock::iterator II,
|
|
|
|
int SPAdj, RegScavenger *RS = NULL) const;
|
2009-07-16 13:27:25 +00:00
|
|
|
|
2009-07-16 13:51:12 +00:00
|
|
|
|
|
|
|
void processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
|
|
|
RegScavenger *RS) const;
|
|
|
|
|
2009-07-16 13:27:25 +00:00
|
|
|
void emitPrologue(MachineFunction &MF) const;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
|
|
|
|
|
|
|
// Debug information queries.
|
|
|
|
unsigned getRARegister() const;
|
2009-11-12 21:00:03 +00:00
|
|
|
unsigned getFrameRegister(const MachineFunction &MF) const;
|
2009-07-16 13:27:25 +00:00
|
|
|
|
|
|
|
// Exception handling queries.
|
|
|
|
unsigned getEHExceptionRegister() const;
|
|
|
|
unsigned getEHHandlerRegister() const;
|
|
|
|
|
|
|
|
int getDwarfRegNum(unsigned RegNum, bool isEH) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|