46 lines · c
1//===-- Mips16RegisterInfo.h - Mips16 Register Information ------*- 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 Mips16 implementation of the TargetRegisterInfo class.10//11//===----------------------------------------------------------------------===//12 13#ifndef LLVM_LIB_TARGET_MIPS_MIPS16REGISTERINFO_H14#define LLVM_LIB_TARGET_MIPS_MIPS16REGISTERINFO_H15 16#include "MipsRegisterInfo.h"17 18namespace llvm {19class Mips16RegisterInfo : public MipsRegisterInfo {20public:21 explicit Mips16RegisterInfo(const MipsSubtarget &STI);22 23 bool requiresRegisterScavenging(const MachineFunction &MF) const override;24 25 bool requiresFrameIndexScavenging(const MachineFunction &MF) const override;26 27 bool useFPForScavengingIndex(const MachineFunction &MF) const override;28 29 bool saveScavengerRegister(MachineBasicBlock &MBB,30 MachineBasicBlock::iterator I,31 MachineBasicBlock::iterator &UseMI,32 const TargetRegisterClass *RC,33 Register Reg) const override;34 35 const TargetRegisterClass *intRegClass(unsigned Size) const override;36 37private:38 void eliminateFI(MachineBasicBlock::iterator II, unsigned OpNo,39 int FrameIndex, uint64_t StackSize,40 int64_t SPOffset) const override;41};42 43} // end namespace llvm44 45#endif46