1 //===- SparcV8RegisterInfo.h - SparcV8 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 SparcV8 implementation of the MRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef SPARCV8REGISTERINFO_H
15 #define SPARCV8REGISTERINFO_H
17 #include "llvm/Target/MRegisterInfo.h"
18 #include "SparcV8GenRegisterInfo.h.inc"
22 class SparcV8Subtarget;
25 struct SparcV8RegisterInfo : public SparcV8GenRegisterInfo {
26 SparcV8Subtarget &Subtarget;
28 SparcV8RegisterInfo(SparcV8Subtarget &st);
30 /// Code Generation virtual methods...
31 void storeRegToStackSlot(MachineBasicBlock &MBB,
32 MachineBasicBlock::iterator MBBI,
33 unsigned SrcReg, int FrameIndex,
34 const TargetRegisterClass *RC) const;
36 void loadRegFromStackSlot(MachineBasicBlock &MBB,
37 MachineBasicBlock::iterator MBBI,
38 unsigned DestReg, int FrameIndex,
39 const TargetRegisterClass *RC) const;
41 void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
42 unsigned DestReg, unsigned SrcReg,
43 const TargetRegisterClass *RC) const;
45 virtual MachineInstr* foldMemoryOperand(MachineInstr* MI,
47 int FrameIndex) const;
49 void eliminateCallFramePseudoInstr(MachineFunction &MF,
50 MachineBasicBlock &MBB,
51 MachineBasicBlock::iterator I) const;
53 void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
55 void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
57 void emitPrologue(MachineFunction &MF) const;
58 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
61 } // end namespace llvm