LLVM API Documentation
00001 //===-- MipsFrameLowering.h - Define frame lowering for Mips ----*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef LLVM_LIB_TARGET_MIPS_MIPSFRAMELOWERING_H 00015 #define LLVM_LIB_TARGET_MIPS_MIPSFRAMELOWERING_H 00016 00017 #include "Mips.h" 00018 #include "llvm/Target/TargetFrameLowering.h" 00019 00020 namespace llvm { 00021 class MipsSubtarget; 00022 00023 class MipsFrameLowering : public TargetFrameLowering { 00024 protected: 00025 const MipsSubtarget &STI; 00026 00027 public: 00028 explicit MipsFrameLowering(const MipsSubtarget &sti, unsigned Alignment) 00029 : TargetFrameLowering(StackGrowsDown, Alignment, 0, Alignment), STI(sti) {} 00030 00031 static const MipsFrameLowering *create(const MipsSubtarget &ST); 00032 00033 bool hasFP(const MachineFunction &MF) const override; 00034 00035 protected: 00036 uint64_t estimateStackSize(const MachineFunction &MF) const; 00037 }; 00038 00039 /// Create MipsFrameLowering objects. 00040 const MipsFrameLowering *createMips16FrameLowering(const MipsSubtarget &ST); 00041 const MipsFrameLowering *createMipsSEFrameLowering(const MipsSubtarget &ST); 00042 00043 } // End llvm namespace 00044 00045 #endif