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.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_ARC_ARCREGISTERINFO_H
14 #define LLVM_LIB_TARGET_ARC_ARCREGISTERINFO_H
15 
16 #include "llvm/CodeGen/TargetRegisterInfo.h"
17 
18 #define GET_REGINFO_HEADER
19 #include "ARCGenRegisterInfo.inc"
20 
21 namespace llvm {
22 
23 class TargetInstrInfo;
24 
25 struct ARCRegisterInfo : public ARCGenRegisterInfo {
26 public:
27   ARCRegisterInfo();
28 
29   /// Code Generation virtual methods...
30 
31   const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;
32 
33   BitVector getReservedRegs(const MachineFunction &MF) const override;
34 
35   bool requiresRegisterScavenging(const MachineFunction &MF) const override;
36 
37   bool useFPForScavengingIndex(const MachineFunction &MF) const override;
38 
39   void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj,
40                            unsigned FIOperandNum,
41                            RegScavenger *RS = nullptr) const override;
42 
43   const uint32_t *getCallPreservedMask(const MachineFunction &MF,
44                                        CallingConv::ID CC) const override;
45 
46   // Debug information queries.
47   Register getFrameRegister(const MachineFunction &MF) const override;
48 
49   //! Return whether to emit frame moves
50   static bool needsFrameMoves(const MachineFunction &MF);
51 };
52 
53 } // end namespace llvm
54 
55 #endif // LLVM_LIB_TARGET_ARC_ARCREGISTERINFO_H
56