LLVM API Documentation

AlphaRegisterInfo.h

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