LLVM API Documentation
00001 //===- ARMRegisterInfo.h - ARM 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 ARM implementation of the TargetRegisterInfo class. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef ARMREGISTERINFO_H 00015 #define ARMREGISTERINFO_H 00016 00017 #include "llvm/Target/TargetRegisterInfo.h" 00018 #include "ARMGenRegisterInfo.h.inc" 00019 00020 namespace llvm { 00021 class ARMSubtarget; 00022 class TargetInstrInfo; 00023 class Type; 00024 00025 struct ARMRegisterInfo : public ARMGenRegisterInfo { 00026 const TargetInstrInfo &TII; 00027 const ARMSubtarget &STI; 00028 private: 00029 /// FramePtr - ARM physical register used as frame ptr. 00030 unsigned FramePtr; 00031 00032 public: 00033 ARMRegisterInfo(const TargetInstrInfo &tii, const ARMSubtarget &STI); 00034 00035 /// emitLoadConstPool - Emits a load from constpool to materialize the 00036 /// specified immediate. 00037 void emitLoadConstPool(MachineBasicBlock &MBB, 00038 MachineBasicBlock::iterator &MBBI, 00039 unsigned DestReg, int Val, 00040 unsigned Pred, unsigned PredReg, 00041 const TargetInstrInfo *TII, bool isThumb) const; 00042 00043 /// getRegisterNumbering - Given the enum value for some register, e.g. 00044 /// ARM::LR, return the number that it corresponds to (e.g. 14). 00045 static unsigned getRegisterNumbering(unsigned RegEnum); 00046 00047 /// Same as previous getRegisterNumbering except it returns true in isSPVFP 00048 /// if the register is a single precision VFP register. 00049 static unsigned getRegisterNumbering(unsigned RegEnum, bool &isSPVFP); 00050 00051 /// Code Generation virtual methods... 00052 const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const; 00053 00054 const TargetRegisterClass* const* 00055 getCalleeSavedRegClasses(const MachineFunction *MF = 0) const; 00056 00057 BitVector getReservedRegs(const MachineFunction &MF) const; 00058 00059 bool isReservedReg(const MachineFunction &MF, unsigned Reg) const; 00060 00061 bool requiresRegisterScavenging(const MachineFunction &MF) const; 00062 00063 bool hasFP(const MachineFunction &MF) const; 00064 00065 bool hasReservedCallFrame(MachineFunction &MF) const; 00066 00067 void eliminateCallFramePseudoInstr(MachineFunction &MF, 00068 MachineBasicBlock &MBB, 00069 MachineBasicBlock::iterator I) const; 00070 00071 void eliminateFrameIndex(MachineBasicBlock::iterator II, 00072 int SPAdj, RegScavenger *RS = NULL) const; 00073 00074 void processFunctionBeforeCalleeSavedScan(MachineFunction &MF, 00075 RegScavenger *RS = NULL) const; 00076 00077 void emitPrologue(MachineFunction &MF) const; 00078 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; 00079 00080 // Debug information queries. 00081 unsigned getRARegister() const; 00082 unsigned getFrameRegister(MachineFunction &MF) const; 00083 00084 // Exception handling queries. 00085 unsigned getEHExceptionRegister() const; 00086 unsigned getEHHandlerRegister() const; 00087 00088 int getDwarfRegNum(unsigned RegNum, bool isEH) const; 00089 00090 bool isLowRegister(unsigned Reg) const; 00091 }; 00092 00093 } // end namespace llvm 00094 00095 #endif
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.