Path: blob/main/contrib/llvm-project/llvm/lib/Target/MSP430/MSP430FrameLowering.h
35267 views
//==- MSP430FrameLowering.h - Define frame lowering for MSP430 --*- C++ -*--==//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8//9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_MSP430_MSP430FRAMELOWERING_H13#define LLVM_LIB_TARGET_MSP430_MSP430FRAMELOWERING_H1415#include "MSP430.h"16#include "llvm/CodeGen/TargetFrameLowering.h"1718namespace llvm {1920class MSP430Subtarget;21class MSP430InstrInfo;22class MSP430RegisterInfo;2324class MSP430FrameLowering : public TargetFrameLowering {25protected:2627public:28MSP430FrameLowering(const MSP430Subtarget &STI);2930const MSP430Subtarget &STI;31const MSP430InstrInfo &TII;32const MSP430RegisterInfo *TRI;3334/// emitProlog/emitEpilog - These methods insert prolog and epilog code into35/// the function.36void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;37void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;3839MachineBasicBlock::iterator40eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,41MachineBasicBlock::iterator I) const override;4243bool spillCalleeSavedRegisters(MachineBasicBlock &MBB,44MachineBasicBlock::iterator MI,45ArrayRef<CalleeSavedInfo> CSI,46const TargetRegisterInfo *TRI) const override;47bool48restoreCalleeSavedRegisters(MachineBasicBlock &MBB,49MachineBasicBlock::iterator MI,50MutableArrayRef<CalleeSavedInfo> CSI,51const TargetRegisterInfo *TRI) const override;5253bool hasFP(const MachineFunction &MF) const override;54bool hasReservedCallFrame(const MachineFunction &MF) const override;55void processFunctionBeforeFrameFinalized(MachineFunction &MF,56RegScavenger *RS = nullptr) const override;5758/// Wraps up getting a CFI index and building a MachineInstr for it.59void BuildCFI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,60const DebugLoc &DL, const MCCFIInstruction &CFIInst,61MachineInstr::MIFlag Flag = MachineInstr::NoFlags) const;6263void emitCalleeSavedFrameMoves(MachineBasicBlock &MBB,64MachineBasicBlock::iterator MBBI,65const DebugLoc &DL, bool IsPrologue) const;66};6768} // End llvm namespace6970#endif717273