LLVM API Documentation
00001 //===- PPC64RegisterInfo.h - PowerPC64 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 PowerPC implementation of the MRegisterInfo class. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef POWERPC64_REGISTERINFO_H 00015 #define POWERPC64_REGISTERINFO_H 00016 00017 #include "PowerPC.h" 00018 #include "PPC64GenRegisterInfo.h.inc" 00019 #include <map> 00020 00021 namespace llvm { 00022 00023 class Type; 00024 00025 class PPC64RegisterInfo : public PPC64GenRegisterInfo { 00026 std::map<unsigned, unsigned> ImmToIdxMap; 00027 public: 00028 PPC64RegisterInfo(); 00029 const TargetRegisterClass* getRegClassForType(const Type* Ty) const; 00030 00031 /// Code Generation virtual methods... 00032 void storeRegToStackSlot(MachineBasicBlock &MBB, 00033 MachineBasicBlock::iterator MBBI, 00034 unsigned SrcReg, int FrameIndex) const; 00035 00036 void loadRegFromStackSlot(MachineBasicBlock &MBB, 00037 MachineBasicBlock::iterator MBBI, 00038 unsigned DestReg, int FrameIndex) const; 00039 00040 void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, 00041 unsigned DestReg, unsigned SrcReg, 00042 const TargetRegisterClass *RC) const; 00043 00044 void eliminateCallFramePseudoInstr(MachineFunction &MF, 00045 MachineBasicBlock &MBB, 00046 MachineBasicBlock::iterator I) const; 00047 00048 void eliminateFrameIndex(MachineBasicBlock::iterator II) const; 00049 00050 void emitPrologue(MachineFunction &MF) const; 00051 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; 00052 }; 00053 00054 } // end namespace llvm 00055 00056 #endif