SparcRegisterInfo.h revision b5f662fa0314f7e7e690aae8ebff7136cc3a5ab0
1//===- SparcV8RegisterInfo.h - SparcV8 Register Information Impl -*- C++ -*-==//
2//
3//                     The LLVM Compiler Infrastructure
4//
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.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the SparcV8 implementation of the MRegisterInfo class.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef SPARCV8REGISTERINFO_H
15#define SPARCV8REGISTERINFO_H
16
17#include "llvm/Target/MRegisterInfo.h"
18#include "SparcV8GenRegisterInfo.h.inc"
19
20namespace llvm {
21
22class Type;
23
24struct SparcV8RegisterInfo : public SparcV8GenRegisterInfo {
25  SparcV8RegisterInfo();
26  const TargetRegisterClass* getRegClassForType(const Type* Ty) const;
27
28  /// Code Generation virtual methods...
29  void storeRegToStackSlot(MachineBasicBlock &MBB,
30                           MachineBasicBlock::iterator MBBI,
31                           unsigned SrcReg, int FrameIndex) const;
32
33  void loadRegFromStackSlot(MachineBasicBlock &MBB,
34                            MachineBasicBlock::iterator MBBI,
35                            unsigned DestReg, int FrameIndex) const;
36
37  void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
38                    unsigned DestReg, unsigned SrcReg,
39                    const TargetRegisterClass *RC) const;
40
41  void eliminateCallFramePseudoInstr(MachineFunction &MF,
42                                     MachineBasicBlock &MBB,
43                                     MachineBasicBlock::iterator I) const;
44
45  void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
46
47  void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
48
49  void emitPrologue(MachineFunction &MF) const;
50  void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
51};
52
53} // end namespace llvm
54
55#endif
56