1 //===-- Mips16FrameLowering.h - Mips16 frame lowering ----------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_MIPS_MIPS16FRAMELOWERING_H
14 #define LLVM_LIB_TARGET_MIPS_MIPS16FRAMELOWERING_H
16 #include "MipsFrameLowering.h"
19 class Mips16FrameLowering
: public MipsFrameLowering
{
21 explicit Mips16FrameLowering(const MipsSubtarget
&STI
);
23 /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
25 void emitPrologue(MachineFunction
&MF
, MachineBasicBlock
&MBB
) const override
;
26 void emitEpilogue(MachineFunction
&MF
, MachineBasicBlock
&MBB
) const override
;
28 bool spillCalleeSavedRegisters(MachineBasicBlock
&MBB
,
29 MachineBasicBlock::iterator MI
,
30 const std::vector
<CalleeSavedInfo
> &CSI
,
31 const TargetRegisterInfo
*TRI
) const override
;
33 bool restoreCalleeSavedRegisters(MachineBasicBlock
&MBB
,
34 MachineBasicBlock::iterator MI
,
35 std::vector
<CalleeSavedInfo
> &CSI
,
36 const TargetRegisterInfo
*TRI
) const override
;
38 bool hasReservedCallFrame(const MachineFunction
&MF
) const override
;
40 void determineCalleeSaves(MachineFunction
&MF
, BitVector
&SavedRegs
,
41 RegScavenger
*RS
) const override
;
44 } // End llvm namespace