LLVM  14.0.0git
AVRFrameLowering.h
Go to the documentation of this file.
1 //===-- AVRFrameLowering.h - Define frame lowering for AVR ------*- 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 #ifndef LLVM_AVR_FRAME_LOWERING_H
10 #define LLVM_AVR_FRAME_LOWERING_H
11 
13 
14 namespace llvm {
15 
16 /// Utilities for creating function call frames.
18 public:
19  explicit AVRFrameLowering();
20 
21 public:
22  void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
23  void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
24  bool hasFP(const MachineFunction &MF) const override;
28  const TargetRegisterInfo *TRI) const override;
29  bool
33  const TargetRegisterInfo *TRI) const override;
34  bool hasReservedCallFrame(const MachineFunction &MF) const override;
35  bool canSimplifyCallFramePseudos(const MachineFunction &MF) const override;
36  void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
37  RegScavenger *RS = nullptr) const override;
40  MachineBasicBlock::iterator MI) const override;
41 };
42 
43 } // end namespace llvm
44 
45 #endif // LLVM_AVR_FRAME_LOWERING_H
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:105
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
llvm::AVRFrameLowering::hasReservedCallFrame
bool hasReservedCallFrame(const MachineFunction &MF) const override
hasReservedCallFrame - Under normal circumstances, when a frame pointer is not required,...
Definition: AVRFrameLowering.cpp:42
TargetFrameLowering.h
llvm::TargetFrameLowering
Information about stack frame layout on the target.
Definition: TargetFrameLowering.h:43
llvm::AVRFrameLowering::determineCalleeSaves
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS=nullptr) const override
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
Definition: AVRFrameLowering.cpp:404
llvm::AVRFrameLowering::canSimplifyCallFramePseudos
bool canSimplifyCallFramePseudos(const MachineFunction &MF) const override
canSimplifyCallFramePseudos - When possible, it's best to simplify the call frame pseudo ops before d...
Definition: AVRFrameLowering.cpp:35
llvm::TargetRegisterInfo
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
Definition: TargetRegisterInfo.h:233
llvm::AVRFrameLowering::emitEpilogue
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
Definition: AVRFrameLowering.cpp:158
TRI
unsigned const TargetRegisterInfo * TRI
Definition: MachineSink.cpp:1559
llvm::MutableArrayRef
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
Definition: ArrayRef.h:305
llvm::AVRFrameLowering::hasFP
bool hasFP(const MachineFunction &MF) const override
hasFP - Return true if the specified function should have a dedicated frame pointer register.
Definition: AVRFrameLowering.cpp:229
llvm::BitVector
Definition: BitVector.h:74
llvm::AVRFrameLowering::eliminateCallFramePseudoInstr
MachineBasicBlock::iterator eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const override
This method is called during prolog/epilog code insertion to eliminate call frame setup and destroy p...
Definition: AVRFrameLowering.cpp:330
llvm::MachineBasicBlock
Definition: MachineBasicBlock.h:95
llvm::RegScavenger
Definition: RegisterScavenging.h:34
llvm::MachineFunction
Definition: MachineFunction.h:234
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::AVRFrameLowering::emitPrologue
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
Definition: AVRFrameLowering.cpp:52
MBB
MachineBasicBlock & MBB
Definition: AArch64SLSHardening.cpp:74
llvm::AVRFrameLowering::spillCalleeSavedRegisters
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...
Definition: AVRFrameLowering.cpp:236
llvm::AVRFrameLowering
Utilities for creating function call frames.
Definition: AVRFrameLowering.h:17
llvm::AVRFrameLowering::AVRFrameLowering
AVRFrameLowering()
Definition: AVRFrameLowering.cpp:32
llvm::MachineInstrBundleIterator< MachineInstr >
llvm::AVRFrameLowering::restoreCalleeSavedRegisters
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...
Definition: AVRFrameLowering.cpp:276