1 //===- LanaiRegisterInfo.h - Lanai 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 Lanai implementation of the TargetRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_LANAI_LANAIREGISTERINFO_H
15 #define LLVM_LIB_TARGET_LANAI_LANAIREGISTERINFO_H
17 #include "llvm/CodeGen/TargetRegisterInfo.h"
19 #define GET_REGINFO_HEADER
20 #include "LanaiGenRegisterInfo.inc"
24 struct LanaiRegisterInfo : public LanaiGenRegisterInfo {
27 const uint32_t *getCallPreservedMask(const MachineFunction &MF,
28 CallingConv::ID) const override;
30 // Code Generation virtual methods.
32 getCalleeSavedRegs(const MachineFunction *MF = nullptr) const override;
34 BitVector getReservedRegs(const MachineFunction &MF) const override;
36 bool requiresRegisterScavenging(const MachineFunction &MF) const override;
38 bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const override;
40 void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj,
41 unsigned FIOperandNum,
42 RegScavenger *RS = nullptr) const override;
44 // Debug information queries.
45 unsigned getRARegister() const;
46 unsigned getFrameRegister(const MachineFunction &MF) const override;
47 unsigned getBaseRegister() const;
48 bool hasBasePointer(const MachineFunction &MF) const;
50 int getDwarfRegNum(unsigned RegNum, bool IsEH) const;
53 } // end namespace llvm
55 #endif // LLVM_LIB_TARGET_LANAI_LANAIREGISTERINFO_H