LLVM 20.0.0git
MipsSEFrameLowering.h
Go to the documentation of this file.
1//===- MipsSEFrameLowering.h - Mips32/64 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#ifndef LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H
10#define LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H
11
12#include "MipsFrameLowering.h"
13
14namespace llvm {
15
16class MachineBasicBlock;
17class MachineFunction;
18class MipsSubtarget;
19
21public:
22 explicit MipsSEFrameLowering(const MipsSubtarget &STI);
23
24 /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
25 /// the function.
26 void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
27 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
28
30 Register &FrameReg) const override;
31
35 const TargetRegisterInfo *TRI) const override;
36
37 bool hasReservedCallFrame(const MachineFunction &MF) const override;
38
40 RegScavenger *RS) const override;
41
42private:
43 void emitInterruptEpilogueStub(MachineFunction &MF,
44 MachineBasicBlock &MBB) const;
45 void emitInterruptPrologueStub(MachineFunction &MF,
46 MachineBasicBlock &MBB) const;
47};
48
49} // end namespace llvm
50
51#endif // LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H
MachineBasicBlock & MBB
IRTranslator LLVM IR MI
unsigned const TargetRegisterInfo * TRI
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
const MipsSubtarget & STI
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS) const override
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
StackOffset getFrameIndexReference(const MachineFunction &MF, int FI, Register &FrameReg) const override
getFrameIndexReference - This method should return the base register and offset used to reference a f...
bool hasReservedCallFrame(const MachineFunction &MF) const override
hasReservedCallFrame - Under normal circumstances, when a frame pointer is not required,...
bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, ArrayRef< CalleeSavedInfo > CSI, const TargetRegisterInfo *TRI) const override
spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns tru...
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
StackOffset holds a fixed and a scalable offset in bytes.
Definition: TypeSize.h:33
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18