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/Target/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 bool canRealignStack(const MachineFunction &MF) const override;
46 // Debug information queries.
47 unsigned getRARegister() const;
48 unsigned getFrameRegister(const MachineFunction &MF) const override;
49 unsigned getBaseRegister() const;
50 bool hasBasePointer(const MachineFunction &MF) const;
52 // Exception handling queries.
53 unsigned getEHExceptionRegister() const;
54 unsigned getEHHandlerRegister() const;
55 int getDwarfRegNum(unsigned RegNum, bool IsEH) const;
58 } // end namespace llvm
60 #endif // LLVM_LIB_TARGET_LANAI_LANAIREGISTERINFO_H