LLVM  10.0.0svn
MipsFrameLowering.h
Go to the documentation of this file.
1 //===-- MipsFrameLowering.h - Define frame lowering for Mips ----*- 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 //
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_MIPS_MIPSFRAMELOWERING_H
14 #define LLVM_LIB_TARGET_MIPS_MIPSFRAMELOWERING_H
15 
16 #include "Mips.h"
18 
19 namespace llvm {
20  class MipsSubtarget;
21 
23 protected:
25 
26 public:
27  explicit MipsFrameLowering(const MipsSubtarget &sti, unsigned Alignment)
28  : TargetFrameLowering(StackGrowsDown, Alignment, 0, Alignment), STI(sti) {}
29 
30  static const MipsFrameLowering *create(const MipsSubtarget &ST);
31 
32  bool hasFP(const MachineFunction &MF) const override;
33 
34  bool hasBP(const MachineFunction &MF) const;
35 
36  bool isFPCloseToIncomingSP() const override { return false; }
37 
38  bool enableShrinkWrapping(const MachineFunction &MF) const override {
39  return true;
40  }
41 
44  MachineBasicBlock &MBB,
45  MachineBasicBlock::iterator I) const override;
46 
47 protected:
48  uint64_t estimateStackSize(const MachineFunction &MF) const;
49 };
50 
51 /// Create MipsFrameLowering objects.
54 
55 } // End llvm namespace
56 
57 #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:23
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