Path: blob/main/contrib/llvm-project/llvm/lib/Target/LoongArch/LoongArchRegisterInfo.h
96353 views
//= LoongArchRegisterInfo.h - LoongArch Register Information Impl -*- C++ -*-=//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file contains the LoongArch implementation of the TargetRegisterInfo9// class.10//11//===----------------------------------------------------------------------===//1213#ifndef LLVM_LIB_TARGET_LOONGARCH_LOONGARCHREGISTERINFO_H14#define LLVM_LIB_TARGET_LOONGARCH_LOONGARCHREGISTERINFO_H1516#include "llvm/CodeGen/TargetRegisterInfo.h"1718#define GET_REGINFO_HEADER19#include "LoongArchGenRegisterInfo.inc"2021namespace llvm {2223struct LoongArchRegisterInfo : public LoongArchGenRegisterInfo {2425LoongArchRegisterInfo(unsigned HwMode);2627const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;28const uint32_t *getCallPreservedMask(const MachineFunction &MF,29CallingConv::ID) const override;30const uint32_t *getNoPreservedMask() const override;3132BitVector getReservedRegs(const MachineFunction &MF) const override;3334const TargetRegisterClass *35getPointerRegClass(const MachineFunction &MF,36unsigned Kind = 0) const override {37return &LoongArch::GPRRegClass;38}3940bool eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj,41unsigned FIOperandNum,42RegScavenger *RS = nullptr) const override;4344Register getFrameRegister(const MachineFunction &MF) const override;4546bool requiresRegisterScavenging(const MachineFunction &MF) const override {47return true;48}4950bool requiresFrameIndexScavenging(const MachineFunction &MF) const override {51return true;52}53bool canRealignStack(const MachineFunction &MF) const override;54};55} // end namespace llvm5657#endif // LLVM_LIB_TARGET_LOONGARCH_LOONGARCHREGISTERINFO_H585960