1//===-- 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) 23 : MipsFrameLowering(STI) {} 24 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 30 bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, 31 MachineBasicBlock::iterator MI, 32 const std::vector<CalleeSavedInfo> &CSI, 33 const TargetRegisterInfo *TRI) const; 34 35 bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, 36 MachineBasicBlock::iterator MI, 37 const std::vector<CalleeSavedInfo> &CSI, 38 const TargetRegisterInfo *TRI) const; 39 40 bool hasReservedCallFrame(const MachineFunction &MF) const; 41 42 void processFunctionBeforeCalleeSavedScan(MachineFunction &MF, 43 RegScavenger *RS) const; 44}; 45 46} // End llvm namespace 47 48#endif 49