]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.h
Import 1.14.3
[FreeBSD/FreeBSD.git] / contrib / llvm / lib / Target / Mips / MipsSEFrameLowering.h
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 //
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H
15 #define LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H
16
17 #include "MipsFrameLowering.h"
18 #include "llvm/CodeGen/MachineBasicBlock.h"
19 #include <vector>
20
21 namespace llvm {
22
23 class MipsSEFrameLowering : public MipsFrameLowering {
24 public:
25   explicit MipsSEFrameLowering(const MipsSubtarget &STI);
26
27   /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
28   /// the function.
29   void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
30   void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
31
32   int getFrameIndexReference(const MachineFunction &MF, int FI,
33                              unsigned &FrameReg) const override;
34
35   bool spillCalleeSavedRegisters(MachineBasicBlock &MBB,
36                                  MachineBasicBlock::iterator MI,
37                                  const std::vector<CalleeSavedInfo> &CSI,
38                                  const TargetRegisterInfo *TRI) const override;
39
40   bool hasReservedCallFrame(const MachineFunction &MF) const override;
41
42   void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
43                             RegScavenger *RS) const override;
44   unsigned ehDataReg(unsigned I) const;
45
46 private:
47   void emitInterruptEpilogueStub(MachineFunction &MF,
48                                  MachineBasicBlock &MBB) const;
49   void emitInterruptPrologueStub(MachineFunction &MF,
50                                  MachineBasicBlock &MBB) const;
51 };
52
53 } // end namespace llvm
54
55 #endif // LLVM_LIB_TARGET_MIPS_MIPSSEFRAMELOWERING_H