xref: /freebsd/contrib/llvm-project/llvm/lib/Target/Mips/Mips16FrameLowering.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1 //===-- Mips16FrameLowering.h - Mips16 frame lowering  ----------*- 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 //
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_MIPS_MIPS16FRAMELOWERING_H
14 #define LLVM_LIB_TARGET_MIPS_MIPS16FRAMELOWERING_H
15 
16 #include "MipsFrameLowering.h"
17 
18 namespace llvm {
19 class Mips16FrameLowering : public MipsFrameLowering {
20 public:
21   explicit Mips16FrameLowering(const MipsSubtarget &STI);
22 
23   /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
24   /// the function.
25   void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
26   void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
27 
28   bool spillCalleeSavedRegisters(MachineBasicBlock &MBB,
29                                  MachineBasicBlock::iterator MI,
30                                  ArrayRef<CalleeSavedInfo> CSI,
31                                  const TargetRegisterInfo *TRI) const override;
32 
33   bool
34   restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
35                               MachineBasicBlock::iterator MI,
36                               MutableArrayRef<CalleeSavedInfo> CSI,
37                               const TargetRegisterInfo *TRI) const override;
38 
39   bool hasReservedCallFrame(const MachineFunction &MF) const override;
40 
41   void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
42                             RegScavenger *RS) const override;
43 };
44 
45 } // End llvm namespace
46 
47 #endif
48