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"
24 struct PowerPCRegisterInfo : public PowerPCGenRegisterInfo {
25 PowerPCRegisterInfo();
26 const TargetRegisterClass* getRegClassForType(const Type* Ty) const;
28 /// Code Generation virtual methods...
29 int storeRegToStackSlot(MachineBasicBlock &MBB,
30 MachineBasicBlock::iterator MBBI,
31 unsigned SrcReg, int FrameIndex,
32 const TargetRegisterClass *RC) const;
34 int loadRegFromStackSlot(MachineBasicBlock &MBB,
35 MachineBasicBlock::iterator MBBI,
36 unsigned DestReg, int FrameIndex,
37 const TargetRegisterClass *RC) const;
39 int copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
40 unsigned DestReg, unsigned SrcReg,
41 const TargetRegisterClass *RC) const;
43 void eliminateCallFramePseudoInstr(MachineFunction &MF,
44 MachineBasicBlock &MBB,
45 MachineBasicBlock::iterator I) const;
47 void eliminateFrameIndex(MachineFunction &MF,
48 MachineBasicBlock::iterator II) const;
50 void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
52 void emitPrologue(MachineFunction &MF) const;
53 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
56 } // end namespace llvm