116c29b5f285f375be53dabaa73e3e91107485fe4Anton Korobeynikov//===-- Thumb1FrameLowering.h - Thumb1-specific frame info stuff --*- C++ -*-=// 233464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov// 333464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov// The LLVM Compiler Infrastructure 433464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov// 533464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov// This file is distributed under the University of Illinois Open Source 633464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov// License. See LICENSE.TXT for details. 733464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov// 833464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov//===----------------------------------------------------------------------===// 933464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov// 1033464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov// 1133464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov// 1233464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov//===----------------------------------------------------------------------===// 1333464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov 1437ed9c199ca639565f6ce88105f9e39e898d82d0Stephen Hines#ifndef LLVM_LIB_TARGET_ARM_THUMB1FRAMELOWERING_H 1537ed9c199ca639565f6ce88105f9e39e898d82d0Stephen Hines#define LLVM_LIB_TARGET_ARM_THUMB1FRAMELOWERING_H 1633464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov 1716c29b5f285f375be53dabaa73e3e91107485fe4Anton Korobeynikov#include "ARMFrameLowering.h" 1833464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov#include "Thumb1InstrInfo.h" 194c5e43da7792f75567b693105cc53e3f1992ad98Pirama Arumuga Nainar#include "ThumbRegisterInfo.h" 2016c29b5f285f375be53dabaa73e3e91107485fe4Anton Korobeynikov#include "llvm/Target/TargetFrameLowering.h" 2133464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov 2233464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikovnamespace llvm { 2333464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov 2416c29b5f285f375be53dabaa73e3e91107485fe4Anton Korobeynikovclass Thumb1FrameLowering : public ARMFrameLowering { 2533464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikovpublic: 26c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines explicit Thumb1FrameLowering(const ARMSubtarget &sti); 2733464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov 2833464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov /// emitProlog/emitEpilog - These methods insert prolog and epilog code into 2933464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov /// the function. 3036b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines void emitPrologue(MachineFunction &MF) const override; 3136b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override; 32d0c38176690e9602a93a20a43f1bd084564a8116Anton Korobeynikov 33cd775ceff0b25a0b026f643a7990c2924bd310a3Anton Korobeynikov bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, 34cd775ceff0b25a0b026f643a7990c2924bd310a3Anton Korobeynikov MachineBasicBlock::iterator MI, 35cd775ceff0b25a0b026f643a7990c2924bd310a3Anton Korobeynikov const std::vector<CalleeSavedInfo> &CSI, 3636b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines const TargetRegisterInfo *TRI) const override; 37cd775ceff0b25a0b026f643a7990c2924bd310a3Anton Korobeynikov bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, 3836b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines MachineBasicBlock::iterator MI, 3936b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines const std::vector<CalleeSavedInfo> &CSI, 4036b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines const TargetRegisterInfo *TRI) const override; 41cd775ceff0b25a0b026f643a7990c2924bd310a3Anton Korobeynikov 4236b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines bool hasReservedCallFrame(const MachineFunction &MF) const override; 43700ed80d3da5e98e05ceb90e9bfb66058581a6dbEli Bendersky 4436b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines void 4536b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines eliminateCallFramePseudoInstr(MachineFunction &MF, 4636b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines MachineBasicBlock &MBB, 4736b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hines MachineBasicBlock::iterator MI) const override; 4833464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov}; 4933464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov 5033464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov} // End llvm namespace 5133464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov 5233464912237efaa0ed7060829e66b59055bdd48bAnton Korobeynikov#endif 53