LLVM  8.0.1
MipsSEFrameLowering.h
Go to the documentation of this file.
1 //===- MipsSEFrameLowering.h - Mips32/64 frame lowering ---------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H
11 #define LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H
12 
13 #include "MipsFrameLowering.h"
14 #include <vector>
15 
16 namespace llvm {
17 
18 class MachineBasicBlock;
19 class MachineFunction;
20 class MipsSubtarget;
21 
23 public:
24  explicit MipsSEFrameLowering(const MipsSubtarget &STI);
25 
26  /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
27  /// the function.
28  void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
29  void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
30 
31  int getFrameIndexReference(const MachineFunction &MF, int FI,
32  unsigned &FrameReg) const override;
33 
36  const std::vector<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 private:
45  void emitInterruptEpilogueStub(MachineFunction &MF,
46  MachineBasicBlock &MBB) const;
47  void emitInterruptPrologueStub(MachineFunction &MF,
48  MachineBasicBlock &MBB) const;
49 };
50 
51 } // end namespace llvm
52 
53 #endif // LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
const MipsSubtarget & STI
unsigned const TargetRegisterInfo * TRI
bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns tru...
bool hasReservedCallFrame(const MachineFunction &MF) const override
hasReservedCallFrame - Under normal circumstances, when a frame pointer is not required, we reserve argument space for call sites in the function immediately on entry to the current function.
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS) const override
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
MipsSEFrameLowering(const MipsSubtarget &STI)
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
IRTranslator LLVM IR MI
int getFrameIndexReference(const MachineFunction &MF, int FI, unsigned &FrameReg) const override
getFrameIndexReference - This method should return the base register and offset used to reference a f...