LLVM  8.0.1
AVRFrameLowering.h
Go to the documentation of this file.
1 //===-- AVRFrameLowering.h - Define frame lowering for AVR ------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_AVR_FRAME_LOWERING_H
11 #define LLVM_AVR_FRAME_LOWERING_H
12 
14 
15 namespace llvm {
16 
17 /// Utilities for creating function call frames.
19 public:
20  explicit AVRFrameLowering();
21 
22 public:
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;
28  const std::vector<CalleeSavedInfo> &CSI,
29  const TargetRegisterInfo *TRI) const override;
30  bool
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;
41  MachineBasicBlock::iterator MI) const override;
42 };
43 
44 } // end namespace llvm
45 
46 #endif // LLVM_AVR_FRAME_LOWERING_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
unsigned const TargetRegisterInfo * TRI
bool hasReservedCallFrame(const MachineFunction &MF) const override
hasReservedCallFrame - Under normal circumstances, when a frame pointer is not required, we reserve argument space for call sites in the function immediately on entry to the current function.
bool canSimplifyCallFramePseudos(const MachineFunction &MF) const override
canSimplifyCallFramePseudos - When possible, it&#39;s best to simplify the call frame pseudo ops before d...
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS=nullptr) const override
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
Information about stack frame layout on the target.
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
bool hasFP(const MachineFunction &MF) const override
hasFP - Return true if the specified function should have a dedicated frame pointer register...
Utilities for creating function call frames.
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
restoreCalleeSavedRegisters - Issues instruction(s) to restore all callee saved registers and returns...
bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns tru...
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...
IRTranslator LLVM IR MI