1 //===-- Nios2RegisterInfo.h - Nios2 Register Information Impl ---*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the Nios2 implementation of the TargetRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_NIOS2_NIOS2REGISTERINFO_H
15 #define LLVM_LIB_TARGET_NIOS2_NIOS2REGISTERINFO_H
18 #include "llvm/CodeGen/TargetRegisterInfo.h"
20 #define GET_REGINFO_HEADER
21 #include "Nios2GenRegisterInfo.inc"
25 class TargetInstrInfo;
28 class Nios2RegisterInfo : public Nios2GenRegisterInfo {
30 const Nios2Subtarget &Subtarget;
33 Nios2RegisterInfo(const Nios2Subtarget &Subtarget);
35 const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;
37 BitVector getReservedRegs(const MachineFunction &MF) const override;
39 /// Stack Frame Processing Methods
40 void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj,
41 unsigned FIOperandNum,
42 RegScavenger *RS = nullptr) const override;
44 /// Debug information queries.
45 unsigned getFrameRegister(const MachineFunction &MF) const override;
47 /// Return GPR register class.
48 const TargetRegisterClass *intRegClass(unsigned Size) const;
51 } // end namespace llvm