59 lines · c
1//===- ARCRegisterInfo.h - ARC Register Information Impl --------*- C++ -*-===//2//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-exception6//7//===----------------------------------------------------------------------===//8//9// This file contains the ARC implementation of the MRegisterInfo class.10//11//===----------------------------------------------------------------------===//12 13#ifndef LLVM_LIB_TARGET_ARC_ARCREGISTERINFO_H14#define LLVM_LIB_TARGET_ARC_ARCREGISTERINFO_H15 16#include "llvm/CodeGen/TargetRegisterInfo.h"17 18#define GET_REGINFO_HEADER19#include "ARCGenRegisterInfo.inc"20 21namespace llvm {22 23class TargetInstrInfo;24class ARCSubtarget;25 26struct ARCRegisterInfo : public ARCGenRegisterInfo {27 const ARCSubtarget &ST;28 29public:30 ARCRegisterInfo(const ARCSubtarget &);31 32 /// Code Generation virtual methods...33 34 const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;35 36 BitVector getReservedRegs(const MachineFunction &MF) const override;37 38 bool requiresRegisterScavenging(const MachineFunction &MF) const override;39 40 bool useFPForScavengingIndex(const MachineFunction &MF) const override;41 42 bool eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj,43 unsigned FIOperandNum,44 RegScavenger *RS = nullptr) const override;45 46 const uint32_t *getCallPreservedMask(const MachineFunction &MF,47 CallingConv::ID CC) const override;48 49 // Debug information queries.50 Register getFrameRegister(const MachineFunction &MF) const override;51 52 //! Return whether to emit frame moves53 static bool needsFrameMoves(const MachineFunction &MF);54};55 56} // end namespace llvm57 58#endif // LLVM_LIB_TARGET_ARC_ARCREGISTERINFO_H59