1239310Sdim//===-- Mips16FrameLowering.h - Mips16 frame lowering ----------*- C++ -*-===// 2239310Sdim// 3239310Sdim// The LLVM Compiler Infrastructure 4239310Sdim// 5239310Sdim// This file is distributed under the University of Illinois Open Source 6239310Sdim// License. See LICENSE.TXT for details. 7239310Sdim// 8239310Sdim//===----------------------------------------------------------------------===// 9239310Sdim// 10239310Sdim// 11239310Sdim// 12239310Sdim//===----------------------------------------------------------------------===// 13239310Sdim 14239310Sdim#ifndef MIPS16_FRAMEINFO_H 15239310Sdim#define MIPS16_FRAMEINFO_H 16239310Sdim 17239310Sdim#include "MipsFrameLowering.h" 18239310Sdim 19239310Sdimnamespace llvm { 20239310Sdimclass Mips16FrameLowering : public MipsFrameLowering { 21239310Sdimpublic: 22239310Sdim explicit Mips16FrameLowering(const MipsSubtarget &STI) 23263508Sdim : MipsFrameLowering(STI, STI.stackAlignment()) {} 24239310Sdim 25239310Sdim /// emitProlog/emitEpilog - These methods insert prolog and epilog code into 26239310Sdim /// the function. 27239310Sdim void emitPrologue(MachineFunction &MF) const; 28239310Sdim void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; 29239310Sdim 30249423Sdim void eliminateCallFramePseudoInstr(MachineFunction &MF, 31249423Sdim MachineBasicBlock &MBB, 32249423Sdim MachineBasicBlock::iterator I) const; 33249423Sdim 34239310Sdim bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, 35239310Sdim MachineBasicBlock::iterator MI, 36239310Sdim const std::vector<CalleeSavedInfo> &CSI, 37239310Sdim const TargetRegisterInfo *TRI) const; 38239310Sdim 39243830Sdim bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, 40243830Sdim MachineBasicBlock::iterator MI, 41243830Sdim const std::vector<CalleeSavedInfo> &CSI, 42243830Sdim const TargetRegisterInfo *TRI) const; 43243830Sdim 44239310Sdim bool hasReservedCallFrame(const MachineFunction &MF) const; 45239310Sdim 46239310Sdim void processFunctionBeforeCalleeSavedScan(MachineFunction &MF, 47239310Sdim RegScavenger *RS) const; 48239310Sdim}; 49239310Sdim 50239310Sdim} // End llvm namespace 51239310Sdim 52239310Sdim#endif 53