02fe14b7d4a614288a5530bb41058a04ff48012d
[oota-llvm.git] / lib / Target / X86 / X86RegisterInfo.h
1 //===- X86RegisterInfo.h - X86 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 X86 implementation of the MRegisterInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef X86REGISTERINFO_H
15 #define X86REGISTERINFO_H
16
17 #include "llvm/Target/MRegisterInfo.h"
18
19 class Type;
20
21 #include "X86GenRegisterInfo.h.inc"
22
23 struct X86RegisterInfo : public X86GenRegisterInfo {
24   X86RegisterInfo();
25   const TargetRegisterClass* getRegClassForType(const Type* Ty) const;
26
27   /// Code Generation virtual methods...
28   void storeRegToStackSlot(MachineBasicBlock &MBB,
29                            MachineBasicBlock::iterator &MBBI,
30                            unsigned SrcReg, int FrameIndex,
31                            const TargetRegisterClass *RC) const;
32
33   void loadRegFromStackSlot(MachineBasicBlock &MBB,
34                             MachineBasicBlock::iterator &MBBI,
35                             unsigned DestReg, int FrameIndex,
36                             const TargetRegisterClass *RC) const;
37   
38   void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI,
39                    unsigned DestReg, unsigned SrcReg,
40                    const TargetRegisterClass *RC) const;
41
42   void eliminateCallFramePseudoInstr(MachineFunction &MF,
43                                      MachineBasicBlock &MBB,
44                                      MachineBasicBlock::iterator &I) const;
45
46   void eliminateFrameIndex(MachineFunction &MF,
47                            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 #endif