LLVM  8.0.1
LanaiFrameLowering.h
Go to the documentation of this file.
1 //===-- LanaiFrameLowering.h - Define frame lowering for Lanai --*- 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 // This class implements Lanai-specific bits of TargetFrameLowering class.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_LANAI_LANAIFRAMELOWERING_H
15 #define LLVM_LIB_TARGET_LANAI_LANAIFRAMELOWERING_H
16 
17 #include "Lanai.h"
19 
20 namespace llvm {
21 
22 class BitVector;
23 class LanaiSubtarget;
24 
26 private:
27  void determineFrameLayout(MachineFunction &MF) const;
28  void replaceAdjDynAllocPseudo(MachineFunction &MF) const;
29 
30 protected:
32 
33 public:
34  explicit LanaiFrameLowering(const LanaiSubtarget &Subtarget)
36  /*StackAlignment=*/8,
37  /*LocalAreaOffset=*/0),
38  STI(Subtarget) {}
39 
40  // emitProlog/emitEpilog - These methods insert prolog and epilog code into
41  // the function.
42  void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
43  void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
44 
47  MachineBasicBlock::iterator I) const override;
48 
49  bool hasFP(const MachineFunction & /*MF*/) const override { return true; }
50 
51  void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
52  RegScavenger *RS = nullptr) const override;
53 };
54 
55 } // namespace llvm
56 
57 #endif // LLVM_LIB_TARGET_LANAI_LANAIFRAMELOWERING_H
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS=nullptr) const override
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
This class represents lattice values for constants.
Definition: AllocatorList.h:24
bool hasFP(const MachineFunction &) const override
hasFP - Return true if the specified function should have a dedicated frame pointer register...
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...
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
const LanaiSubtarget & STI
Information about stack frame layout on the target.
LanaiFrameLowering(const LanaiSubtarget &Subtarget)
#define I(x, y, z)
Definition: MD5.cpp:58