LLVM  3.7.0
AArch64FrameLowering.h
Go to the documentation of this file.
1 //==-- AArch64FrameLowering.h - TargetFrameLowering for AArch64 --*- 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 //
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64FRAMELOWERING_H
15 #define LLVM_LIB_TARGET_AARCH64_AARCH64FRAMELOWERING_H
16 
18 
19 namespace llvm {
20 
22 public:
25  true /*StackRealignable*/) {}
26 
29  unsigned FramePtr) const;
30 
32  MachineBasicBlock &MBB,
33  MachineBasicBlock::iterator I) const override;
34 
35  /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
36  /// the function.
37  void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
38  void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
39 
40  int getFrameIndexOffset(const MachineFunction &MF, int FI) const override;
41  int getFrameIndexReference(const MachineFunction &MF, int FI,
42  unsigned &FrameReg) const override;
43  int resolveFrameIndexReference(const MachineFunction &MF, int FI,
44  unsigned &FrameReg,
45  bool PreferFP = false) const;
48  const std::vector<CalleeSavedInfo> &CSI,
49  const TargetRegisterInfo *TRI) const override;
50 
53  const std::vector<CalleeSavedInfo> &CSI,
54  const TargetRegisterInfo *TRI) const override;
55 
56  /// \brief Can this function use the red zone for local allocations.
57  bool canUseRedZone(const MachineFunction &MF) const;
58 
59  bool hasFP(const MachineFunction &MF) const override;
60  bool hasReservedCallFrame(const MachineFunction &MF) const override;
61 
62  void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
63  RegScavenger *RS) const override;
64 };
65 
66 } // End llvm namespace
67 
68 #endif
int resolveFrameIndexReference(const MachineFunction &MF, int FI, unsigned &FrameReg, bool PreferFP=false) const
void emitCalleeSavedFrameMoves(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned FramePtr) const
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 restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
restoreCalleeSavedRegisters - Issues instruction(s) to restore all callee saved registers and returns...
int getFrameIndexReference(const MachineFunction &MF, int FI, unsigned &FrameReg) const override
getFrameIndexReference - Provide a base+offset reference to an FI slot for debug info.
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS) const override
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
#define true
Definition: ConvertUTF.c:66
bundle_iterator - MachineBasicBlock iterator that automatically skips over MIs that are inside bundle...
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const override
eliminateCallFramePseudoInstr - This method is called during prolog/epilog code insertion to eliminat...
int getFrameIndexOffset(const MachineFunction &MF, int FI) const override
getFrameIndexOffset - Returns the displacement from the frame register to the stack frame of the spec...
Information about stack frame layout on the target.
bool hasFP(const MachineFunction &MF) const override
hasFP - Return true if the specified function should have a dedicated frame pointer register...
#define I(x, y, z)
Definition: MD5.cpp:54
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...
bool canUseRedZone(const MachineFunction &MF) const
Can this function use the red zone for local allocations.
static const unsigned FramePtr