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 19 namespace llvm { 20 class Mips16FrameLowering : public MipsFrameLowering { 21 public: 22 explicit Mips16FrameLowering(const MipsSubtarget &STI); 23 24 /// emitProlog/emitEpilog - These methods insert prolog and epilog code into 25 /// the function. 26 void emitPrologue(MachineFunction &MF) const override; 27 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override; 28 29 void eliminateCallFramePseudoInstr(MachineFunction &MF, 30 MachineBasicBlock &MBB, 31 MachineBasicBlock::iterator I) const override; 32 33 bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, 34 MachineBasicBlock::iterator MI, 35 const std::vector<CalleeSavedInfo> &CSI, 36 const TargetRegisterInfo *TRI) const override; 37 38 bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, 39 MachineBasicBlock::iterator MI, 40 const std::vector<CalleeSavedInfo> &CSI, 41 const TargetRegisterInfo *TRI) const override; 42 43 bool hasReservedCallFrame(const MachineFunction &MF) const override; 44 45 void processFunctionBeforeCalleeSavedScan(MachineFunction &MF, 46 RegScavenger *RS) const override; 47 }; 48 49 } // End llvm namespace 50 51 #endif 52