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 POWERPC_REGISTERINFO_H
15 #define POWERPC_REGISTERINFO_H
17 #include "llvm/Target/MRegisterInfo.h"
23 class PowerPCRegisterInfo : public PowerPCGenRegisterInfo {
24 std::map<unsigned, unsigned> ImmToIdxMap;
26 PowerPCRegisterInfo();
27 const TargetRegisterClass* getRegClassForType(const Type* Ty) const;
29 /// Code Generation virtual methods...
30 void storeRegToStackSlot(MachineBasicBlock &MBB,
31 MachineBasicBlock::iterator MBBI,
32 unsigned SrcReg, int FrameIndex) const;
34 void loadRegFromStackSlot(MachineBasicBlock &MBB,
35 MachineBasicBlock::iterator MBBI,
36 unsigned DestReg, int FrameIndex) const;
38 void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
39 unsigned DestReg, unsigned SrcReg,
40 const TargetRegisterClass *RC) const;
42 void eliminateCallFramePseudoInstr(MachineFunction &MF,
43 MachineBasicBlock &MBB,
44 MachineBasicBlock::iterator I) const;
46 void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
48 void emitPrologue(MachineFunction &MF) const;
49 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
52 } // end namespace llvm