LLVM API Documentation

ARMRegisterInfo.h

Go to the documentation of this file.
00001 //===- ARMRegisterInfo.h - ARM Register Information Impl --------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file was developed by the "Instituto Nokia de Tecnologia" and
00006 // is distributed under the University of Illinois Open Source
00007 // License. See LICENSE.TXT for details.
00008 //
00009 //===----------------------------------------------------------------------===//
00010 //
00011 // This file contains the ARM implementation of the MRegisterInfo class.
00012 //
00013 //===----------------------------------------------------------------------===//
00014 
00015 #ifndef ARMREGISTERINFO_H
00016 #define ARMREGISTERINFO_H
00017 
00018 #include "llvm/Target/MRegisterInfo.h"
00019 #include "ARMGenRegisterInfo.h.inc"
00020 
00021 namespace llvm {
00022 
00023 class Type;
00024 
00025 struct ARMRegisterInfo : public ARMGenRegisterInfo {
00026 
00027   ARMRegisterInfo();
00028 
00029   /// Code Generation virtual methods...
00030   void storeRegToStackSlot(MachineBasicBlock &MBB,
00031                            MachineBasicBlock::iterator MBBI,
00032                            unsigned SrcReg, int FrameIndex,
00033                            const TargetRegisterClass *RC) const;
00034 
00035   void loadRegFromStackSlot(MachineBasicBlock &MBB,
00036                             MachineBasicBlock::iterator MBBI,
00037                             unsigned DestReg, int FrameIndex,
00038                             const TargetRegisterClass *RC) const;
00039 
00040   void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
00041                     unsigned DestReg, unsigned SrcReg,
00042                     const TargetRegisterClass *RC) const;
00043 
00044   virtual MachineInstr* foldMemoryOperand(MachineInstr* MI,
00045                                           unsigned OpNum,
00046                                           int FrameIndex) const;
00047 
00048   const unsigned *getCalleeSaveRegs() const;
00049 
00050   const TargetRegisterClass* const* getCalleeSaveRegClasses() const;
00051 
00052   void eliminateCallFramePseudoInstr(MachineFunction &MF,
00053                                      MachineBasicBlock &MBB,
00054                                      MachineBasicBlock::iterator I) const;
00055 
00056   void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
00057 
00058   void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
00059 
00060   void emitPrologue(MachineFunction &MF) const;
00061   void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
00062 
00063   // Debug information queries.
00064   unsigned getRARegister() const;
00065   unsigned getFrameRegister(MachineFunction &MF) const;
00066 };
00067 
00068 } // end namespace llvm
00069 
00070 #endif