LLVM  14.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 
14 namespace llvm {
15 
16 class MachineBasicBlock;
17 class MachineFunction;
18 class MipsSubtarget;
19 
21 public:
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 
39  void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
40  RegScavenger *RS) const override;
41 
42 private:
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
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:105
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::MipsSEFrameLowering::hasReservedCallFrame
bool hasReservedCallFrame(const MachineFunction &MF) const override
hasReservedCallFrame - Under normal circumstances, when a frame pointer is not required,...
Definition: MipsSEFrameLowering.cpp:842
llvm::MipsSEFrameLowering::getFrameIndexReference
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...
Definition: MipsSEFrameLowering.cpp:778
llvm::TargetRegisterInfo
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
Definition: TargetRegisterInfo.h:233
llvm::MipsSEFrameLowering::emitEpilogue
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
Definition: MipsSEFrameLowering.cpp:688
llvm::MipsSEFrameLowering::spillCalleeSavedRegisters
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...
Definition: MipsSEFrameLowering.cpp:793
TRI
unsigned const TargetRegisterInfo * TRI
Definition: MachineSink.cpp:1567
llvm::MipsSEFrameLowering::determineCalleeSaves
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS) const override
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
Definition: MipsSEFrameLowering.cpp:860
llvm::MipsSEFrameLowering
Definition: MipsSEFrameLowering.h:20
llvm::BitVector
Definition: BitVector.h:74
llvm::MipsFrameLowering::STI
const MipsSubtarget & STI
Definition: MipsFrameLowering.h:24
llvm::MachineBasicBlock
Definition: MachineBasicBlock.h:95
MipsFrameLowering.h
llvm::MipsSEFrameLowering::MipsSEFrameLowering
MipsSEFrameLowering(const MipsSubtarget &STI)
Definition: MipsSEFrameLowering.cpp:398
llvm::RegScavenger
Definition: RegisterScavenging.h:34
llvm::MachineFunction
Definition: MachineFunction.h:234
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::StackOffset
StackOffset is a class to represent an offset with 2 dimensions, named fixed and scalable,...
Definition: TypeSize.h:134
llvm::MipsFrameLowering
Definition: MipsFrameLowering.h:22
llvm::MipsSubtarget
Definition: MipsSubtarget.h:39
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
MBB
MachineBasicBlock & MBB
Definition: AArch64SLSHardening.cpp:74
llvm::MipsSEFrameLowering::emitPrologue
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
Definition: MipsSEFrameLowering.cpp:401
llvm::MachineInstrBundleIterator< MachineInstr >