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