1 //===- PowerPCRegisterInfo.h - PowerPC 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 POWERPCREGISTERINFO_H
15 #define POWERPCREGISTERINFO_H
17 #include "llvm/Target/MRegisterInfo.h"
18 #include "PowerPCGenRegisterInfo.h.inc"
25 class PowerPCRegisterInfo : public PowerPCGenRegisterInfo {
27 std::map<unsigned, unsigned> ImmToIdxMap;
29 PowerPCRegisterInfo(bool is64b);
30 const TargetRegisterClass* getRegClassForType(const Type* Ty) const;
32 /// Code Generation virtual methods...
33 int storeRegToStackSlot(MachineBasicBlock &MBB,
34 MachineBasicBlock::iterator MBBI,
35 unsigned SrcReg, int FrameIndex) const;
37 int loadRegFromStackSlot(MachineBasicBlock &MBB,
38 MachineBasicBlock::iterator MBBI,
39 unsigned DestReg, int FrameIndex) const;
41 int copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
42 unsigned DestReg, unsigned SrcReg,
43 const TargetRegisterClass *RC) const;
45 void eliminateCallFramePseudoInstr(MachineFunction &MF,
46 MachineBasicBlock &MBB,
47 MachineBasicBlock::iterator I) const;
49 void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
51 void emitPrologue(MachineFunction &MF) const;
52 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
55 } // end namespace llvm