Remove (hopefully) all trailing whitespaces from the mips backend. Patch by Hatanaka...
[oota-llvm.git] / lib / Target / Mips / MipsRegisterInfo.h
1 //===- MipsRegisterInfo.h - Mips Register Information Impl ------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the Mips implementation of the TargetRegisterInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef MIPSREGISTERINFO_H
15 #define MIPSREGISTERINFO_H
16
17 #include "Mips.h"
18 #include "llvm/Target/TargetRegisterInfo.h"
19 #include "MipsGenRegisterInfo.h.inc"
20
21 namespace llvm {
22 class MipsSubtarget;
23 class TargetInstrInfo;
24 class Type;
25
26 struct MipsRegisterInfo : public MipsGenRegisterInfo {
27   const MipsSubtarget &Subtarget;
28   const TargetInstrInfo &TII;
29
30   MipsRegisterInfo(const MipsSubtarget &Subtarget, const TargetInstrInfo &tii);
31
32   /// getRegisterNumbering - Given the enum value for some register, e.g.
33   /// Mips::RA, return the number that it corresponds to (e.g. 31).
34   static unsigned getRegisterNumbering(unsigned RegEnum);
35
36   /// Get PIC indirect call register
37   static unsigned getPICCallReg();
38
39   /// Adjust the Mips stack frame.
40   void adjustMipsStackFrame(MachineFunction &MF) const;
41
42   /// Code Generation virtual methods...
43   const unsigned *getCalleeSavedRegs(const MachineFunction* MF = 0) const;
44
45   BitVector getReservedRegs(const MachineFunction &MF) const;
46
47   void eliminateCallFramePseudoInstr(MachineFunction &MF,
48                                      MachineBasicBlock &MBB,
49                                      MachineBasicBlock::iterator I) const;
50
51   /// Stack Frame Processing Methods
52   void eliminateFrameIndex(MachineBasicBlock::iterator II,
53                            int SPAdj, RegScavenger *RS = NULL) const;
54
55   void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
56
57   /// Debug information queries.
58   unsigned getRARegister() const;
59   unsigned getFrameRegister(const MachineFunction &MF) const;
60
61   /// Exception handling queries.
62   unsigned getEHExceptionRegister() const;
63   unsigned getEHHandlerRegister() const;
64
65   int getDwarfRegNum(unsigned RegNum, bool isEH) const;
66 };
67
68 } // end namespace llvm
69
70 #endif