1 //===- ARCRegisterInfo.h - ARC 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 ARC implementation of the MRegisterInfo class.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_ARC_ARCREGISTERINFO_H
14 #define LLVM_LIB_TARGET_ARC_ARCREGISTERINFO_H
16 #include "llvm/CodeGen/TargetRegisterInfo.h"
18 #define GET_REGINFO_HEADER
19 #include "ARCGenRegisterInfo.inc"
23 class TargetInstrInfo
;
25 struct ARCRegisterInfo
: public ARCGenRegisterInfo
{
29 /// Code Generation virtual methods...
31 const MCPhysReg
*getCalleeSavedRegs(const MachineFunction
*MF
) const override
;
33 BitVector
getReservedRegs(const MachineFunction
&MF
) const override
;
35 bool requiresRegisterScavenging(const MachineFunction
&MF
) const override
;
37 bool trackLivenessAfterRegAlloc(const MachineFunction
&MF
) const override
;
39 bool useFPForScavengingIndex(const MachineFunction
&MF
) const override
;
41 void eliminateFrameIndex(MachineBasicBlock::iterator II
, int SPAdj
,
42 unsigned FIOperandNum
,
43 RegScavenger
*RS
= nullptr) const override
;
45 const uint32_t *getCallPreservedMask(const MachineFunction
&MF
,
46 CallingConv::ID CC
) const override
;
48 // Debug information queries.
49 Register
getFrameRegister(const MachineFunction
&MF
) const override
;
51 //! Return whether to emit frame moves
52 static bool needsFrameMoves(const MachineFunction
&MF
);
55 } // end namespace llvm
57 #endif // LLVM_LIB_TARGET_ARC_ARCREGISTERINFO_H