Pass extra regclasses into spilling code
[oota-llvm.git] / lib / Target / Sparc / SparcRegisterInfo.h
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
20 namespace llvm {
21
22 class Type;
23
24 struct 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,
32                            const TargetRegisterClass *RC) const;
33
34   void loadRegFromStackSlot(MachineBasicBlock &MBB,
35                             MachineBasicBlock::iterator MBBI,
36                             unsigned DestReg, int FrameIndex,
37                             const TargetRegisterClass *RC) const;
38
39   void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
40                     unsigned DestReg, unsigned SrcReg,
41                     const TargetRegisterClass *RC) const;
42
43   void eliminateCallFramePseudoInstr(MachineFunction &MF,
44                                      MachineBasicBlock &MBB,
45                                      MachineBasicBlock::iterator I) const;
46
47   void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
48
49   void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
50
51   void emitPrologue(MachineFunction &MF) const;
52   void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
53 };
54
55 } // end namespace llvm
56
57 #endif