Mips16RegisterInfo.h revision 700ed80d3da5e98e05ceb90e9bfb66058581a6db
1//===-- Mips16RegisterInfo.h - Mips16 Register Information ------*- 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 Mips16 implementation of the TargetRegisterInfo class.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef MIPS16REGISTERINFO_H
15#define MIPS16REGISTERINFO_H
16
17#include "MipsRegisterInfo.h"
18
19namespace llvm {
20class Mips16InstrInfo;
21
22class Mips16RegisterInfo : public MipsRegisterInfo {
23  const Mips16InstrInfo &TII;
24public:
25  Mips16RegisterInfo(const MipsSubtarget &Subtarget,
26                     const Mips16InstrInfo &TII);
27
28  bool requiresRegisterScavenging(const MachineFunction &MF) const;
29
30  bool requiresFrameIndexScavenging(const MachineFunction &MF) const;
31
32  bool useFPForScavengingIndex(const MachineFunction &MF) const;
33
34  bool saveScavengerRegister(MachineBasicBlock &MBB,
35                                     MachineBasicBlock::iterator I,
36                                     MachineBasicBlock::iterator &UseMI,
37                                     const TargetRegisterClass *RC,
38                                     unsigned Reg) const;
39
40private:
41  virtual void eliminateFI(MachineBasicBlock::iterator II, unsigned OpNo,
42                           int FrameIndex, uint64_t StackSize,
43                           int64_t SPOffset) const;
44};
45
46} // end namespace llvm
47
48#endif
49