Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / lib / Target / Mips / Mips16RegisterInfo.h
blobff115b30162b9fef6cc12e89e9fbe304ebebe2f9
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-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the Mips16 implementation of the TargetRegisterInfo class.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_MIPS_MIPS16REGISTERINFO_H
14 #define LLVM_LIB_TARGET_MIPS_MIPS16REGISTERINFO_H
16 #include "MipsRegisterInfo.h"
18 namespace llvm {
20 class Mips16RegisterInfo : public MipsRegisterInfo {
21 public:
22 Mips16RegisterInfo();
24 bool requiresRegisterScavenging(const MachineFunction &MF) const override;
26 bool requiresFrameIndexScavenging(const MachineFunction &MF) const override;
28 bool useFPForScavengingIndex(const MachineFunction &MF) const override;
30 bool saveScavengerRegister(MachineBasicBlock &MBB,
31 MachineBasicBlock::iterator I,
32 MachineBasicBlock::iterator &UseMI,
33 const TargetRegisterClass *RC,
34 Register Reg) const override;
36 const TargetRegisterClass *intRegClass(unsigned Size) const override;
38 private:
39 void eliminateFI(MachineBasicBlock::iterator II, unsigned OpNo,
40 int FrameIndex, uint64_t StackSize,
41 int64_t SPOffset) const override;
44 } // end namespace llvm
46 #endif