1 //===- PPC64RegisterInfo.h - PowerPC64 Register Information Impl -*- C++ -*-==//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the PowerPC implementation of the MRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef POWERPC64_REGISTERINFO_H
15 #define POWERPC64_REGISTERINFO_H
18 #include "PPC64GenRegisterInfo.h.inc"
25 class PPC64RegisterInfo : public PPC64GenRegisterInfo {
26 std::map<unsigned, unsigned> ImmToIdxMap;
29 const TargetRegisterClass* getRegClassForType(const Type* Ty) const;
31 /// Code Generation virtual methods...
32 void storeRegToStackSlot(MachineBasicBlock &MBB,
33 MachineBasicBlock::iterator MBBI,
34 unsigned SrcReg, int FrameIndex) const;
36 void loadRegFromStackSlot(MachineBasicBlock &MBB,
37 MachineBasicBlock::iterator MBBI,
38 unsigned DestReg, int FrameIndex) const;
40 void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
41 unsigned DestReg, unsigned SrcReg,
42 const TargetRegisterClass *RC) const;
44 void eliminateCallFramePseudoInstr(MachineFunction &MF,
45 MachineBasicBlock &MBB,
46 MachineBasicBlock::iterator I) const;
48 void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
50 void emitPrologue(MachineFunction &MF) const;
51 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
54 } // end namespace llvm