For PR1207:
[oota-llvm.git] / lib / Target / IA64 / IA64RegisterInfo.h
1 //===- IA64RegisterInfo.h - IA64 Register Information Impl ------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by Duraid Madina and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the IA64 implementation of the MRegisterInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef IA64REGISTERINFO_H
15 #define IA64REGISTERINFO_H
16
17 #include "llvm/Target/MRegisterInfo.h"
18 #include "IA64GenRegisterInfo.h.inc"
19
20 namespace llvm { class llvm::Type; }
21
22 namespace llvm {
23
24 class TargetInstrInfo;
25
26 struct IA64RegisterInfo : public IA64GenRegisterInfo {
27   const TargetInstrInfo &TII;
28
29   IA64RegisterInfo(const TargetInstrInfo &tii);
30
31   /// Code Generation virtual methods...
32   void storeRegToStackSlot(MachineBasicBlock &MBB,
33                            MachineBasicBlock::iterator MI,
34                            unsigned SrcReg, int FrameIndex,
35                            const TargetRegisterClass *RC) const;
36
37   void loadRegFromStackSlot(MachineBasicBlock &MBB,
38                             MachineBasicBlock::iterator MI,
39                             unsigned DestReg, int FrameIndex,
40                             const TargetRegisterClass *RC) const;
41
42   void copyRegToReg(MachineBasicBlock &MBB,
43                     MachineBasicBlock::iterator MI,
44                     unsigned DestReg, unsigned SrcReg,
45                     const TargetRegisterClass *RC) const;
46
47   const unsigned *getCalleeSavedRegs() const;
48
49   const TargetRegisterClass* const* getCalleeSavedRegClasses() const;
50
51   bool hasFP(const MachineFunction &MF) const;
52
53   void eliminateCallFramePseudoInstr(MachineFunction &MF,
54                                      MachineBasicBlock &MBB,
55                                      MachineBasicBlock::iterator MI) const;
56
57   void eliminateFrameIndex(MachineBasicBlock::iterator MI) const;
58
59   void emitPrologue(MachineFunction &MF) const;
60   void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
61
62   // Debug information queries.
63   unsigned getRARegister() const;
64   unsigned getFrameRegister(MachineFunction &MF) const;
65 };
66
67 } // End llvm namespace
68
69 #endif
70