2012-02-28 07:46:26 +00:00
|
|
|
//===-- MipsFrameLowering.h - Define frame lowering for Mips ----*- C++ -*-===//
|
2010-11-15 00:06:54 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
2011-04-15 21:51:11 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2010-11-15 00:06:54 +00:00
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
2011-04-15 21:51:11 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2010-11-15 00:06:54 +00:00
|
|
|
|
2011-03-04 19:20:24 +00:00
|
|
|
#ifndef MIPS_FRAMEINFO_H
|
|
|
|
#define MIPS_FRAMEINFO_H
|
2010-11-15 00:06:54 +00:00
|
|
|
|
|
|
|
#include "Mips.h"
|
2011-01-10 12:39:04 +00:00
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
2010-11-15 00:06:54 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class MipsSubtarget;
|
|
|
|
|
2011-01-10 12:39:04 +00:00
|
|
|
class MipsFrameLowering : public TargetFrameLowering {
|
2010-11-15 00:06:54 +00:00
|
|
|
protected:
|
|
|
|
const MipsSubtarget &STI;
|
|
|
|
|
|
|
|
public:
|
2013-03-29 01:51:04 +00:00
|
|
|
explicit MipsFrameLowering(const MipsSubtarget &sti, unsigned Alignment)
|
|
|
|
: TargetFrameLowering(StackGrowsDown, Alignment, 0, Alignment), STI(sti) {}
|
2010-11-15 00:06:54 +00:00
|
|
|
|
2014-07-18 23:33:47 +00:00
|
|
|
static const MipsFrameLowering *create(const MipsSubtarget &ST);
|
2012-08-02 18:21:47 +00:00
|
|
|
|
2014-04-29 07:58:02 +00:00
|
|
|
bool hasFP(const MachineFunction &MF) const override;
|
2012-11-02 21:10:22 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
uint64_t estimateStackSize(const MachineFunction &MF) const;
|
2010-11-15 00:06:54 +00:00
|
|
|
};
|
|
|
|
|
2013-03-12 00:16:36 +00:00
|
|
|
/// Create MipsFrameLowering objects.
|
2012-08-02 18:21:47 +00:00
|
|
|
const MipsFrameLowering *createMips16FrameLowering(const MipsSubtarget &ST);
|
|
|
|
const MipsFrameLowering *createMipsSEFrameLowering(const MipsSubtarget &ST);
|
|
|
|
|
2010-11-15 00:06:54 +00:00
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|