Changes to match new MRegisterInfo api
[oota-llvm.git] / lib / Target / X86 / X86RegisterInfo.h
1 //===- X86RegisterInfo.h - X86 Register Information Impl --------*- C++ -*-===//
2 //
3 // This file contains the X86 implementation of the MRegisterInfo class.
4 //
5 //===----------------------------------------------------------------------===//
6
7 #ifndef X86REGISTERINFO_H
8 #define X86REGISTERINFO_H
9
10 #include "llvm/Target/MRegisterInfo.h"
11
12 class Type;
13
14 struct X86RegisterInfo : public MRegisterInfo {
15   X86RegisterInfo();
16
17   const unsigned* getCalleeSaveRegs() const;
18
19   /// Returns register class appropriate for input SSA register
20   /// 
21   const TargetRegisterClass *getClassForReg(unsigned Reg) const;
22   const TargetRegisterClass* getRegClassForType(const Type* Ty) const;
23
24   /// Code Generation virtual methods...
25   void storeRegToStackSlot(MachineBasicBlock &MBB,
26                            MachineBasicBlock::iterator &MBBI,
27                            unsigned SrcReg, int FrameIndex,
28                            const TargetRegisterClass *RC) const;
29
30   void loadRegFromStackSlot(MachineBasicBlock &MBB,
31                             MachineBasicBlock::iterator &MBBI,
32                             unsigned DestReg, int FrameIndex,
33                             const TargetRegisterClass *RC) const;
34   
35   void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI,
36                    unsigned DestReg, unsigned SrcReg,
37                    const TargetRegisterClass *RC) const;
38
39   void eliminateCallFramePseudoInstr(MachineFunction &MF,
40                                      MachineBasicBlock &MBB,
41                                      MachineBasicBlock::iterator &I) const;
42
43   void eliminateFrameIndex(MachineFunction &MF,
44                            MachineBasicBlock::iterator &II) const;
45
46   void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
47
48   void emitPrologue(MachineFunction &MF) const;
49   void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
50 };
51
52 #endif