1 //===-- AVRFrameLowering.h - Define frame lowering for AVR ------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_AVR_FRAME_LOWERING_H
11 #define LLVM_AVR_FRAME_LOWERING_H
13 #include "llvm/CodeGen/TargetFrameLowering.h"
17 /// Utilities for creating function call frames.
18 class AVRFrameLowering : public TargetFrameLowering {
20 explicit AVRFrameLowering();
23 void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
24 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
25 bool hasFP(const MachineFunction &MF) const override;
26 bool spillCalleeSavedRegisters(MachineBasicBlock &MBB,
27 MachineBasicBlock::iterator MI,
28 const std::vector<CalleeSavedInfo> &CSI,
29 const TargetRegisterInfo *TRI) const override;
31 restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
32 MachineBasicBlock::iterator MI,
33 std::vector<CalleeSavedInfo> &CSI,
34 const TargetRegisterInfo *TRI) const override;
35 bool hasReservedCallFrame(const MachineFunction &MF) const override;
36 bool canSimplifyCallFramePseudos(const MachineFunction &MF) const override;
37 void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
38 RegScavenger *RS = nullptr) const override;
39 MachineBasicBlock::iterator
40 eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
41 MachineBasicBlock::iterator MI) const override;
44 } // end namespace llvm
46 #endif // LLVM_AVR_FRAME_LOWERING_H