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