• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- Nios2RegisterInfo.h - Nios2 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 Nios2 implementation of the TargetRegisterInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_NIOS2_NIOS2REGISTERINFO_H
15 #define LLVM_LIB_TARGET_NIOS2_NIOS2REGISTERINFO_H
16 
17 #include "Nios2.h"
18 #include "llvm/CodeGen/TargetRegisterInfo.h"
19 
20 #define GET_REGINFO_HEADER
21 #include "Nios2GenRegisterInfo.inc"
22 
23 namespace llvm {
24 class Nios2Subtarget;
25 class TargetInstrInfo;
26 class Type;
27 
28 class Nios2RegisterInfo : public Nios2GenRegisterInfo {
29 protected:
30   const Nios2Subtarget &Subtarget;
31 
32 public:
33   Nios2RegisterInfo(const Nios2Subtarget &Subtarget);
34 
35   const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;
36 
37   BitVector getReservedRegs(const MachineFunction &MF) const override;
38 
39   /// Stack Frame Processing Methods
40   void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj,
41                            unsigned FIOperandNum,
42                            RegScavenger *RS = nullptr) const override;
43 
44   /// Debug information queries.
45   unsigned getFrameRegister(const MachineFunction &MF) const override;
46 
47   /// Return GPR register class.
48   const TargetRegisterClass *intRegClass(unsigned Size) const;
49 };
50 
51 } // end namespace llvm
52 #endif
53