blob: 54fdb7871466461ffbd9cb9ef54f7f0bb2718f31 [file] [log] [blame]
Akira Hatanakacdb3ba72012-07-31 22:50:19 +00001//===-- Mips16FrameLowering.h - Mips16 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 MIPS16_FRAMEINFO_H
15#define MIPS16_FRAMEINFO_H
16
17#include "MipsFrameLowering.h"
18
19namespace llvm {
20class Mips16FrameLowering : public MipsFrameLowering {
21public:
22 explicit Mips16FrameLowering(const MipsSubtarget &STI)
Akira Hatanaka8c0b9b02013-03-29 01:51:04 +000023 : MipsFrameLowering(STI, 8) {}
Akira Hatanakacdb3ba72012-07-31 22:50:19 +000024
25 /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
26 /// the function.
27 void emitPrologue(MachineFunction &MF) const;
28 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
29
Eli Bendersky700ed802013-02-21 20:05:00 +000030 void eliminateCallFramePseudoInstr(MachineFunction &MF,
31 MachineBasicBlock &MBB,
32 MachineBasicBlock::iterator I) const;
33
Akira Hatanakacdb3ba72012-07-31 22:50:19 +000034 bool spillCalleeSavedRegisters(MachineBasicBlock &MBB,
35 MachineBasicBlock::iterator MI,
36 const std::vector<CalleeSavedInfo> &CSI,
37 const TargetRegisterInfo *TRI) const;
38
Akira Hatanaka0fdf3b02012-09-21 01:08:16 +000039 bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
40 MachineBasicBlock::iterator MI,
41 const std::vector<CalleeSavedInfo> &CSI,
42 const TargetRegisterInfo *TRI) const;
43
Akira Hatanakacdb3ba72012-07-31 22:50:19 +000044 bool hasReservedCallFrame(const MachineFunction &MF) const;
45
46 void processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
47 RegScavenger *RS) const;
48};
49
50} // End llvm namespace
51
52#endif