MipsRegisterInfo.h revision 0e6a052331f674dd70e28af41f654a7874405eab
1//===- MipsRegisterInfo.h - Mips Register Information Impl ------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file contains the Mips implementation of the TargetRegisterInfo class. 11// 12//===----------------------------------------------------------------------===// 13 14#ifndef MIPSREGISTERINFO_H 15#define MIPSREGISTERINFO_H 16 17#include "Mips.h" 18#include "llvm/Target/TargetRegisterInfo.h" 19 20#define GET_REGINFO_HEADER 21#include "MipsGenRegisterInfo.inc" 22 23namespace llvm { 24class MipsSubtarget; 25class TargetInstrInfo; 26class Type; 27 28struct MipsRegisterInfo : public MipsGenRegisterInfo { 29 const MipsSubtarget &Subtarget; 30 const TargetInstrInfo &TII; 31 32 MipsRegisterInfo(const MipsSubtarget &Subtarget, const TargetInstrInfo &tii); 33 34 /// getRegisterNumbering - Given the enum value for some register, e.g. 35 /// Mips::RA, return the number that it corresponds to (e.g. 31). 36 static unsigned getRegisterNumbering(unsigned RegEnum); 37 38 /// Get PIC indirect call register 39 static unsigned getPICCallReg(); 40 41 /// Adjust the Mips stack frame. 42 void adjustMipsStackFrame(MachineFunction &MF) const; 43 44 /// Code Generation virtual methods... 45 const unsigned *getCalleeSavedRegs(const MachineFunction* MF = 0) const; 46 47 BitVector getReservedRegs(const MachineFunction &MF) const; 48 49 void eliminateCallFramePseudoInstr(MachineFunction &MF, 50 MachineBasicBlock &MBB, 51 MachineBasicBlock::iterator I) const; 52 53 /// Stack Frame Processing Methods 54 void eliminateFrameIndex(MachineBasicBlock::iterator II, 55 int SPAdj, RegScavenger *RS = NULL) const; 56 57 void processFunctionBeforeFrameFinalized(MachineFunction &MF) const; 58 59 /// Debug information queries. 60 unsigned getFrameRegister(const MachineFunction &MF) const; 61 62 /// Exception handling queries. 63 unsigned getEHExceptionRegister() const; 64 unsigned getEHHandlerRegister() const; 65}; 66 67} // end namespace llvm 68 69#endif 70