1 //===-- XtensaRegisterInfo.h - Xtensa Register Information Impl -*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file contains the Xtensa implementation of the TargetRegisterInfo class.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_XTENSA_XTENSAREGISTERINFO_H
14 #define LLVM_LIB_TARGET_XTENSA_XTENSAREGISTERINFO_H
17 #include "llvm/CodeGen/TargetRegisterInfo.h"
19 #define GET_REGINFO_HEADER
20 #include "XtensaGenRegisterInfo.inc"
23 class TargetRegisterClass
;
24 class XtensaInstrInfo
;
25 class XtensaSubtarget
;
27 class XtensaRegisterInfo
: public XtensaGenRegisterInfo
{
29 const XtensaSubtarget
&Subtarget
;
31 XtensaRegisterInfo(const XtensaSubtarget
&STI
);
33 bool requiresRegisterScavenging(const MachineFunction
&MF
) const override
{
37 bool requiresFrameIndexScavenging(const MachineFunction
&MF
) const override
{
41 bool trackLivenessAfterRegAlloc(const MachineFunction
&) const override
{
46 getCalleeSavedRegs(const MachineFunction
*MF
= 0) const override
;
47 const uint32_t *getCallPreservedMask(const MachineFunction
&MF
,
48 CallingConv::ID
) const override
;
49 BitVector
getReservedRegs(const MachineFunction
&MF
) const override
;
51 bool eliminateFrameIndex(MachineBasicBlock::iterator MI
, int SPAdj
,
52 unsigned FIOperandNum
,
53 RegScavenger
*RS
= nullptr) const override
;
55 Register
getFrameRegister(const MachineFunction
&MF
) const override
;
58 } // end namespace llvm
60 #endif // LLVM_LIB_TARGET_XTENSA_REGISTERINFO_H