LLVM API Documentation
00001 //===- SparcRegisterInfo.h - Sparc Register Information Impl ----*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file contains the Sparc implementation of the TargetRegisterInfo class. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef SPARCREGISTERINFO_H 00015 #define SPARCREGISTERINFO_H 00016 00017 #include "llvm/Target/TargetRegisterInfo.h" 00018 #include "SparcGenRegisterInfo.h.inc" 00019 00020 namespace llvm { 00021 00022 class SparcSubtarget; 00023 class TargetInstrInfo; 00024 class Type; 00025 00026 struct SparcRegisterInfo : public SparcGenRegisterInfo { 00027 SparcSubtarget &Subtarget; 00028 const TargetInstrInfo &TII; 00029 00030 SparcRegisterInfo(SparcSubtarget &st, const TargetInstrInfo &tii); 00031 00032 /// Code Generation virtual methods... 00033 const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const; 00034 00035 const TargetRegisterClass* const* getCalleeSavedRegClasses( 00036 const MachineFunction *MF = 0) const; 00037 00038 BitVector getReservedRegs(const MachineFunction &MF) const; 00039 00040 bool hasFP(const MachineFunction &MF) const; 00041 00042 void eliminateCallFramePseudoInstr(MachineFunction &MF, 00043 MachineBasicBlock &MBB, 00044 MachineBasicBlock::iterator I) const; 00045 00046 void eliminateFrameIndex(MachineBasicBlock::iterator II, 00047 int SPAdj, RegScavenger *RS = NULL) const; 00048 00049 void processFunctionBeforeFrameFinalized(MachineFunction &MF) const; 00050 00051 void emitPrologue(MachineFunction &MF) const; 00052 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; 00053 00054 // Debug information queries. 00055 unsigned getRARegister() const; 00056 unsigned getFrameRegister(MachineFunction &MF) const; 00057 00058 // Exception handling queries. 00059 unsigned getEHExceptionRegister() const; 00060 unsigned getEHHandlerRegister() const; 00061 00062 int getDwarfRegNum(unsigned RegNum, bool isEH) const; 00063 }; 00064 00065 } // end namespace llvm 00066 00067 #endif