Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / lib / Target / ARC / ARCRegisterInfo.h
blobea82289022eb568398fbdd155822c9d9919b963a
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-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
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"
21 namespace llvm {
23 class TargetInstrInfo;
24 class ARCSubtarget;
26 struct ARCRegisterInfo : public ARCGenRegisterInfo {
27 const ARCSubtarget &ST;
29 public:
30 ARCRegisterInfo(const ARCSubtarget &);
32 /// Code Generation virtual methods...
34 const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;
36 BitVector getReservedRegs(const MachineFunction &MF) const override;
38 bool requiresRegisterScavenging(const MachineFunction &MF) const override;
40 bool useFPForScavengingIndex(const MachineFunction &MF) const override;
42 bool eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj,
43 unsigned FIOperandNum,
44 RegScavenger *RS = nullptr) const override;
46 const uint32_t *getCallPreservedMask(const MachineFunction &MF,
47 CallingConv::ID CC) const override;
49 // Debug information queries.
50 Register getFrameRegister(const MachineFunction &MF) const override;
52 //! Return whether to emit frame moves
53 static bool needsFrameMoves(const MachineFunction &MF);
56 } // end namespace llvm
58 #endif // LLVM_LIB_TARGET_ARC_ARCREGISTERINFO_H