LLVM 20.0.0git
MSP430FrameLowering.h
Go to the documentation of this file.
1//==- MSP430FrameLowering.h - Define frame lowering for MSP430 --*- C++ -*--==//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9//
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_MSP430_MSP430FRAMELOWERING_H
14#define LLVM_LIB_TARGET_MSP430_MSP430FRAMELOWERING_H
15
16#include "MSP430.h"
18
19namespace llvm {
20
21class MSP430Subtarget;
22class MSP430InstrInfo;
23class MSP430RegisterInfo;
24
26protected:
27 bool hasFPImpl(const MachineFunction &MF) const override;
28
29public:
31
35
36 /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
37 /// the function.
38 void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
39 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
40
43 MachineBasicBlock::iterator I) const override;
44
48 const TargetRegisterInfo *TRI) const override;
49 bool
53 const TargetRegisterInfo *TRI) const override;
54
55 bool hasReservedCallFrame(const MachineFunction &MF) const override;
57 RegScavenger *RS = nullptr) const override;
58
59 /// Wraps up getting a CFI index and building a MachineInstr for it.
61 const DebugLoc &DL, const MCCFIInstruction &CFIInst,
63
66 const DebugLoc &DL, bool IsPrologue) const;
67};
68
69} // End llvm namespace
70
71#endif
MachineBasicBlock & MBB
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
MachineBasicBlock MachineBasicBlock::iterator MBBI
IRTranslator LLVM IR MI
#define I(x, y, z)
Definition: MD5.cpp:58
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
A debug info location.
Definition: DebugLoc.h:33
const MSP430Subtarget & STI
bool hasFPImpl(const MachineFunction &MF) const override
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, ArrayRef< CalleeSavedInfo > CSI, const TargetRegisterInfo *TRI) const override
spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns tru...
void emitCalleeSavedFrameMoves(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, bool IsPrologue) const
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
MachineBasicBlock::iterator eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const override
This method is called during prolog/epilog code insertion to eliminate call frame setup and destroy p...
bool hasReservedCallFrame(const MachineFunction &MF) const override
hasReservedCallFrame - Under normal circumstances, when a frame pointer is not required,...
const MSP430RegisterInfo * TRI
void processFunctionBeforeFrameFinalized(MachineFunction &MF, RegScavenger *RS=nullptr) const override
processFunctionBeforeFrameFinalized - This method is called immediately before the specified function...
bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, MutableArrayRef< CalleeSavedInfo > CSI, const TargetRegisterInfo *TRI) const override
restoreCalleeSavedRegisters - Issues instruction(s) to restore all callee saved registers and returns...
void BuildCFI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, const MCCFIInstruction &CFIInst, MachineInstr::MIFlag Flag=MachineInstr::NoFlags) const
Wraps up getting a CFI index and building a MachineInstr for it.
const MSP430InstrInfo & TII
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
Definition: ArrayRef.h:310
Information about stack frame layout on the target.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18