Finegrainify namespacification.
[oota-llvm.git] / lib / Target / Skeleton / SkeletonRegisterInfo.h
1 //===- SkeletonRegisterInfo.h - Skeleton 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 Skeleton implementation of the MRegisterInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef SKELETON_REGISTERINFO_H
15 #define SKELETON_REGISTERINFO_H
16
17 #include "SkeletonGenRegisterInfo.h.inc"
18
19 namespace llvm {
20   class Type;
21
22   struct SkeletonRegisterInfo : public SkeletonGenRegisterInfo {
23     SkeletonRegisterInfo();
24     const TargetRegisterClass* getRegClassForType(const Type* Ty) const;
25     
26     void storeRegToStackSlot(MachineBasicBlock &MBB,
27                              MachineBasicBlock::iterator MBBI,
28                              unsigned SrcReg, int FrameIndex) const;
29     
30     void loadRegFromStackSlot(MachineBasicBlock &MBB,
31                               MachineBasicBlock::iterator MBBI,
32                               unsigned DestReg, int FrameIndex) const;
33     
34     void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
35                       unsigned DestReg, unsigned SrcReg,
36                       const TargetRegisterClass *RC) const;
37     
38     void eliminateCallFramePseudoInstr(MachineFunction &MF,
39                                        MachineBasicBlock &MBB,
40                                        MachineBasicBlock::iterator I) const;
41     
42     void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
43     
44     void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
45     
46     void emitPrologue(MachineFunction &MF) const;
47     void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
48   };
49 } // end namespace llvm
50
51 #endif