LLVM  8.0.1
MipsFrameLowering.h
Go to the documentation of this file.
1 //===-- MipsFrameLowering.h - Define frame lowering for Mips ----*- 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_MIPS_MIPSFRAMELOWERING_H
15 #define LLVM_LIB_TARGET_MIPS_MIPSFRAMELOWERING_H
16 
17 #include "Mips.h"
19 
20 namespace llvm {
21  class MipsSubtarget;
22 
24 protected:
26 
27 public:
28  explicit MipsFrameLowering(const MipsSubtarget &sti, unsigned Alignment)
29  : TargetFrameLowering(StackGrowsDown, Alignment, 0, Alignment), STI(sti) {}
30 
31  static const MipsFrameLowering *create(const MipsSubtarget &ST);
32 
33  bool hasFP(const MachineFunction &MF) const override;
34 
35  bool hasBP(const MachineFunction &MF) const;
36 
37  bool isFPCloseToIncomingSP() const override { return false; }
38 
39  bool enableShrinkWrapping(const MachineFunction &MF) const override {
40  return true;
41  }
42 
45  MachineBasicBlock &MBB,
46  MachineBasicBlock::iterator I) const override;
47 
48 protected:
49  uint64_t estimateStackSize(const MachineFunction &MF) const;
50 };
51 
52 /// Create MipsFrameLowering objects.
55 
56 } // End llvm namespace
57 
58 #endif
const MipsFrameLowering * createMipsSEFrameLowering(const MipsSubtarget &ST)
bool hasBP(const MachineFunction &MF) const
const MipsFrameLowering * createMips16FrameLowering(const MipsSubtarget &ST)
Create MipsFrameLowering objects.
This class represents lattice values for constants.
Definition: AllocatorList.h:24
const MipsSubtarget & STI
bool enableShrinkWrapping(const MachineFunction &MF) const override
Returns true if the target will correctly handle shrink wrapping.
static const MipsFrameLowering * create(const MipsSubtarget &ST)
bool hasFP(const MachineFunction &MF) const override
hasFP - Return true if the specified function should have a dedicated frame pointer register...
MipsFrameLowering(const MipsSubtarget &sti, unsigned Alignment)
bool isFPCloseToIncomingSP() const override
isFPCloseToIncomingSP - Return true if the frame pointer is close to the incoming stack pointer...
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...
Information about stack frame layout on the target.
#define I(x, y, z)
Definition: MD5.cpp:58
uint64_t estimateStackSize(const MachineFunction &MF) const