LLVM API Documentation

PIC16RegisterInfo.h

Go to the documentation of this file.
00001 //===- PIC16RegisterInfo.h - PIC16 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 PIC16 implementation of the TargetRegisterInfo class.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef PIC16REGISTERINFO_H
00015 #define PIC16REGISTERINFO_H
00016 
00017 #include "PIC16GenRegisterInfo.h.inc"
00018 #include "llvm/Target/TargetRegisterInfo.h"
00019 
00020 namespace llvm {
00021 
00022 // Forward Declarations.
00023   class PIC16Subtarget;
00024   class TargetInstrInfo;
00025 
00026 class PIC16RegisterInfo : public PIC16GenRegisterInfo {
00027   private:
00028     const TargetInstrInfo &TII;
00029     const PIC16Subtarget &ST;
00030   
00031   public:
00032     PIC16RegisterInfo(const TargetInstrInfo &tii, 
00033                       const PIC16Subtarget &st);
00034 
00035 
00036   //------------------------------------------------------
00037   // Pure virtual functions from TargetRegisterInfo
00038   //------------------------------------------------------
00039 
00040   // PIC16 callee saved registers
00041   virtual const unsigned* 
00042   getCalleeSavedRegs(const MachineFunction *MF = 0) const;
00043 
00044   // PIC16 callee saved register classes
00045   virtual const TargetRegisterClass* const *
00046   getCalleeSavedRegClasses(const MachineFunction *MF) const;
00047 
00048   virtual BitVector getReservedRegs(const MachineFunction &MF) const;
00049   virtual bool hasFP(const MachineFunction &MF) const;
00050 
00051   virtual void eliminateFrameIndex(MachineBasicBlock::iterator MI,
00052                         int SPAdj, RegScavenger *RS=NULL) const;
00053 
00054   void eliminateCallFramePseudoInstr(MachineFunction &MF,
00055                                      MachineBasicBlock &MBB,
00056                                      MachineBasicBlock::iterator I) const;
00057 
00058   virtual void emitPrologue(MachineFunction &MF) const;
00059   virtual void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
00060   virtual int getDwarfRegNum(unsigned RegNum, bool isEH) const;
00061   virtual unsigned getFrameRegister(MachineFunction &MF) const;
00062   virtual unsigned getRARegister() const;
00063 
00064 };
00065 
00066 } // end namespace llvm
00067 
00068 #endif