Home | History | Annotate | Download | only in Mips
      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 MIPS_FRAMEINFO_H
     15 #define MIPS_FRAMEINFO_H
     16 
     17 #include "Mips.h"
     18 #include "llvm/Target/TargetFrameLowering.h"
     19 
     20 namespace llvm {
     21   class MipsSubtarget;
     22 
     23 class MipsFrameLowering : public TargetFrameLowering {
     24 protected:
     25   const MipsSubtarget &STI;
     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(MipsTargetMachine &TM,
     32                                          const MipsSubtarget &ST);
     33 
     34   bool hasFP(const MachineFunction &MF) const override;
     35 
     36 protected:
     37   uint64_t estimateStackSize(const MachineFunction &MF) const;
     38 };
     39 
     40 /// Create MipsFrameLowering objects.
     41 const MipsFrameLowering *createMips16FrameLowering(const MipsSubtarget &ST);
     42 const MipsFrameLowering *createMipsSEFrameLowering(const MipsSubtarget &ST);
     43 
     44 } // End llvm namespace
     45 
     46 #endif
     47